$headers=@{}
$headers.Add("x-access-token", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.videodb.io/collection/{collection_id}/generate/text/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"prompt": "Summarize the content of this video",
"video_id": "m-12345",
"model_name": "gpt-4",
"max_tokens": 500,
"temperature": 0.7,
"callback_url": "https://webhook.example.com/callback"
}'
import Foundation
let parameters = [
"prompt": "Summarize the content of this video",
"video_id": "m-12345",
"model_name": "gpt-4",
"max_tokens": 500,
"temperature": 0.7,
"callback_url": "https://webhook.example.com/callback"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.videodb.io/collection/{collection_id}/generate/text/")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-access-token": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/collection/{collection_id}/generate/text/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
request.AddJsonBody("{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/collection/{collection_id}/generate/text/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
request.AddJsonBody("{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}")
val request = Request.Builder()
.url("https://api.videodb.io/collection/{collection_id}/generate/text/")
.post(body)
.addHeader("x-access-token", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
$headers=@{}
$headers.Add("x-access-token", "<api-key>")
$headers.Add("Content-Type", "application/json")
$response = Invoke-WebRequest -Uri 'https://api.videodb.io/collection/{collection_id}/generate/text/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"prompt": "Summarize the content of this video",
"video_id": "m-12345",
"model_name": "gpt-4",
"max_tokens": 500,
"temperature": 0.7,
"callback_url": "https://webhook.example.com/callback"
}'
import Foundation
let parameters = [
"prompt": "Summarize the content of this video",
"video_id": "m-12345",
"model_name": "gpt-4",
"max_tokens": 500,
"temperature": 0.7,
"callback_url": "https://webhook.example.com/callback"
] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://api.videodb.io/collection/{collection_id}/generate/text/")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-access-token": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/collection/{collection_id}/generate/text/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
request.AddJsonBody("{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
using RestSharp;
var options = new RestClientOptions("https://api.videodb.io/collection/{collection_id}/generate/text/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("x-access-token", "<api-key>");
request.AddJsonBody("{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"prompt\": \"Summarize the content of this video\",\n \"video_id\": \"m-12345\",\n \"model_name\": \"gpt-4\",\n \"max_tokens\": 500,\n \"temperature\": 0.7,\n \"callback_url\": \"https://webhook.example.com/callback\"\n}")
val request = Request.Builder()
.url("https://api.videodb.io/collection/{collection_id}/generate/text/")
.post(body)
.addHeader("x-access-token", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
Generate text content using AI language models. Use the basic default, a mini, pro, or ultra built-in, or a self-hosted model name, and get results as plain text or JSON.
import jsonimport videodbconn = videodb.connect(api_key="your_api_key")coll = conn.get_collection()# Generate plain textscript_response = coll.generate_text( prompt="Write a 30-second commercial script for a coffee brand", model_name="pro", response_type="text")script = ( script_response if isinstance(script_response, str) else script_response.get("output", script_response))print(script)# Generate JSON responsedata_response = coll.generate_text( prompt="Extract key points from a video summary", model_name="pro", response_type="json")json_output = ( data_response if isinstance(data_response, str) else data_response.get("output", data_response))data = json.loads(json_output) if isinstance(json_output, str) else json_outputprint(data)
import { connect } from 'videodb';const conn = connect({ apiKey: 'your_api_key' });const coll = await conn.getCollection();// Generate plain textconst scriptResult = await coll.generateText( "Write a 30-second commercial script for a coffee brand", "pro", "text");const script = typeof scriptResult === "string" ? scriptResult : scriptResult.output;if (typeof script !== "string") { throw new Error("Expected a text response.");}console.log(script);// Generate JSON responseconst jsonResult = await coll.generateText( "Extract key points from a video summary", "pro", "json");const jsonOutput = typeof jsonResult === "string" ? jsonResult : jsonResult.output;const data = typeof jsonOutput === "string" ? JSON.parse(jsonOutput) : jsonOutput;console.log(data);
Model options: basic (default), mini, pro, and ultra built-ins, or a self-hosted model name
Response types: text for plain text or json for JSON-formatted output
generate_text() returns a string or object; some responses wrap the generated value in output. Parse JSON text when structured data is needed
Text generation supports wait and callback options
Useful for generating captions, scripts, summaries, and extracted data
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"VideoDB Documentation","colors":{"primary":"#ec601c","light":"#f5f5f5","dark":"#1a1a1a"},"logo":{"light":"https://mintcdn.com/videodb/GgiJu8HrYcTvfnRD/logo/light.svg?fit=max\u0026auto=format\u0026n=GgiJu8HrYcTvfnRD\u0026q=85\u0026s=613ed1f657ca517349000e89cf435607","dark":"https://mintcdn.com/videodb/GgiJu8HrYcTvfnRD/logo/dark.svg?fit=max\u0026auto=format\u0026n=GgiJu8HrYcTvfnRD\u0026q=85\u0026s=c517cf520b7cc14475457829efb77cb9"},"favicon":{"light":"https://mintcdn.com/videodb/GgiJu8HrYcTvfnRD/favicon.svg?fit=max\u0026auto=format\u0026n=GgiJu8HrYcTvfnRD\u0026q=85\u0026s=ce0221086f37460c2ae7d5c49fc01926","dark":"https://mintcdn.com/videodb/GgiJu8HrYcTvfnRD/favicon.svg?fit=max\u0026auto=format\u0026n=GgiJu8HrYcTvfnRD\u0026q=85\u0026s=ce0221086f37460c2ae7d5c49fc01926"},"api":{"playground":{"display":"interactive"},"examples":{"languages":["bash","javascript","php","go","java","ruby","powershell","swift","csharp","dotnet","typescript","c","c++","kotlin"]},"mdx":{"auth":{"method":"key","name":"x-access-token"},"server":"https://api.videodb.io"}},"navbar":{"links":[],"primary":{"type":"button","label":"Get API Key","href":"https://console.videodb.io/auth?utm_source=docs_videodb_io\u0026utm_medium=docs_link\u0026utm_campaign=console_auth\u0026utm_content=docs_link\u0026id=docs"}},"footer":{"socials":{"x":"https://x.com/videodb_io","github":"https://github.com/video-db","linkedin":"https://www.linkedin.com/company/videodb","discord":"https://discord.com/invite/py9P639jGz"}},"seo":{"metatags":{"canonical":"https://docs.videodb.io"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"ga4":{"measurementId":"G-JSXFX7121R"}},"errors":{"404":{"redirect":false,"title":"SCENE NOT FOUND"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"videodb","hasAudioNarration":false,"actualSubdomain":"videodb","customDomains":["docs.videodb.io"],"gitSource":{"type":"github","owner":"video-db","repo":"videodb-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af4a898bf76e62f8d451b2b","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":348},{"language":"default","tag":"Documentation","count":91},{"language":"default","tag":"Examples \u0026 Tutorials","count":51},{"language":"default","tag":"RTStream","count":31},{"language":"default","tag":"Understand","count":18},{"language":"default","tag":"Act","count":17},{"language":"default","tag":"Automate","count":17},{"language":"default","tag":"Capture","count":15},{"language":"default","tag":"Collections","count":14},{"language":"default","tag":"Videos","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"community-love.css","content":".community-love-testimonials{display:contents;--community-testimonial-card-bg: #efefef;--community-testimonial-card-hover-bg: #cbcbcb;--community-testimonial-card-border: rgba(0, 0, 0, 0.05);--community-testimonial-card-hover-border: rgba(0, 0, 0, 0.12);--community-testimonial-card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);--community-testimonial-name-color: #000000;--community-testimonial-byline-color: #615c5a;--community-testimonial-body-color: #000000;--community-testimonial-platform-color: #000000}.dark .community-love-testimonials,[data-theme=\"dark\"] .community-love-testimonials,[data-color-mode=\"dark\"] .community-love-testimonials{--community-testimonial-card-bg: #151515;--community-testimonial-card-hover-bg: #1e1e1e;--community-testimonial-card-border: rgba(255, 255, 255, 0.05);--community-testimonial-card-hover-border: rgba(255, 255, 255, 0.16);--community-testimonial-card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);--community-testimonial-name-color: #f7f7f7;--community-testimonial-byline-color: rgba(255, 255, 255, 0.45);--community-testimonial-body-color: rgba(255, 255, 255, 0.88);--community-testimonial-platform-color: #ffffff}html[data-current-path$=\"/community-love\"],html[data-current-path$=\"/community-love\"] body{overscroll-behavior-y:none}html[data-current-path$=\"/community-love\"] #body-content,html[data-current-path$=\"/community-love\"] #content-area,html[data-current-path$=\"/community-love\"] #content,html[data-current-path$=\"/community-love\"] mdx-content{min-height:auto!important}html[data-current-path$=\"/community-love\"] #footer,html[data-current-path$=\"/community-love\"] footer{margin-bottom:0!important;padding-bottom:0!important}"}],"page":{"pagePath":"api-reference/generation/generate_text","slug":"/api-reference/generation/generate_text","pageMetadata":{"title":"Generate Text with AI","openapi":"POST /collection/{collection_id}/generate/text/","description":"Generate text content using AI language models for captions, scripts, and summaries","keywords":["ai-video-generation","text-to-video","text-to-speech","image-generation","music-generation","api-reference"],"href":"/api-reference/generation/generate_text"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate text content using AI language models for captions, scripts, and summaries\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Note}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Generate text content using AI language models. Use the basic default, a mini, pro, or ultra built-in, or a self-hosted model name, and get results as plain text or JSON.`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`34`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`34`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` videodb`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`conn `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` videodb.connect(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your_api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`coll `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` conn.get_collection()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Generate plain text`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`script_response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` coll.generate_text(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Write a 30-second commercial script for a coffee brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`script `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` script_response`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` isinstance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(script_response, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` script_response.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, script_response)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(script)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Generate JSON response`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data_response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` coll.generate_text(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Extract key points from a video summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` response_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`json_output `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data_response`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` isinstance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data_response, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data_response.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, data_response)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json.loads(json_output) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` isinstance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(json_output, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json_output`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`35`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'videodb'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` conn`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your_api_key'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` coll`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` conn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getCollection`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate plain text`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` scriptResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` coll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`generateText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Write a 30-second commercial script for a coffee brand\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` script`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` scriptResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` scriptResult`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` scriptResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`output`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` script`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Expected a text response.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generate JSON response`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` jsonResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` coll`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`generateText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Extract key points from a video summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` jsonOutput`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonResult`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`output`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` typeof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonOutput`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"string\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`jsonOutput`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jsonOutput`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Model options: `,_jsx(_components.code,{children:`basic`}),` (default), `,_jsx(_components.code,{children:`mini`}),`, `,_jsx(_components.code,{children:`pro`}),`, and `,_jsx(_components.code,{children:`ultra`}),` built-ins, or a self-hosted model name`]}),`\n`,_jsxs(_components.li,{children:[`Response types: `,_jsx(_components.code,{children:`text`}),` for plain text or `,_jsx(_components.code,{children:`json`}),` for JSON-formatted output`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`generate_text()`}),` returns a string or object; some responses wrap the generated value in `,_jsx(_components.code,{children:`output`}),`. Parse JSON text when structured data is needed`]}),`\n`,_jsxs(_components.li,{children:[`Text generation supports `,_jsx(_components.code,{children:`wait`}),` and callback options`]}),`\n`,_jsx(_components.li,{children:`Useful for generating captions, scripts, summaries, and extracted data`}),`\n`]})}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Generative Media Guide`,icon:`wand`,href:`/pages/act/generative-media/index`,children:_jsx(_components.p,{children:`Learn about all AI generation capabilities`})}),_jsx(Card,{title:`Text Prompts Tutorial`,icon:`pen`,href:`/examples-and-tutorials/content-factory/text-prompts`,children:_jsx(_components.p,{children:`Master text prompting strategies for generation`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate Text with AI","openapi":"POST /collection/{collection_id}/generate/text/","description":"Generate text content using AI language models for captions, scripts, and summaries","keywords":["ai-video-generation","text-to-video","text-to-speech","image-generation","music-generation","api-reference"],"href":"/api-reference/generation/generate_text"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/videodb/1183f1a3c2dbd858/console-utm-forwarding.js"],"openApiReferenceData":{"operation":{"summary":"Generate text using AI","security":["679e0069-6979-4134-9862-536a1a914d94"],"parameters":["34f9605f-1e8e-4c23-93c7-b8a0328de67e"],"requestBody":"44e6bf1b-03b2-4b04-98cd-4dbbf89432c7","responses":{"200":"a416217d-eaa2-4bda-b81e-4d5bd411dfd2"},"method":"post","type":"path","servers":["a3dcbd38-5fbd-46aa-a172-ee74f897ac5a","f17c675b-6aaf-4314-96e0-90eac53742ae"],"path":"/collection/{collection_id}/generate/text/","baseUrlOptions":["https://api.videodb.io","https://staging-api.videodb.io"],"title":"Generate text using AI","description":"Generate text content using AI language models for captions, scripts, and summaries","codeSamples":[],"requestExampleLanguages":["bash","javascript","php","go","java","ruby","powershell","swift","csharp","dotnet","typescript","c","c++","kotlin"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"34f9605f-1e8e-4c23-93c7-b8a0328de67e":{"name":"collection_id","in":"path","required":true,"schema":{"type":"string","example":"default","isRequired":true,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","example":"Summarize the content of this video","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"video_id":{"type":"string","example":"m-12345","uniqueKey":"video_id","typeLabel":"string"},"model_name":{"type":"string","example":"gpt-4","uniqueKey":"model_name","typeLabel":"string"},"max_tokens":{"type":"integer","example":500,"uniqueKey":"max_tokens","typeLabel":"integer"},"temperature":{"type":"number","example":0.7,"uniqueKey":"temperature","typeLabel":"number"},"callback_url":{"type":"string","example":"https://webhook.example.com/callback","uniqueKey":"callback_url","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"prompt":"Summarize the content of this video","video_id":"m-12345","model_name":"gpt-4","max_tokens":500,"temperature":0.7,"callback_url":"https://webhook.example.com/callback"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a416217d-eaa2-4bda-b81e-4d5bd411dfd2":{"description":"Text generation started or completed","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"oneOf.0.success","typeLabel":"boolean"},"status":{"type":"string","enum":["processing","done","failed"],"example":"processing","uniqueKey":"oneOf.0.status","typeLabel":"enum\u003cstring>"},"data":{"type":"object","properties":{"id":{"type":"string","example":"job-123","uniqueKey":"oneOf.0.data.id","typeLabel":"string"},"output_url":{"type":"string","example":"https://api.videodb.io/async-response/job-123","uniqueKey":"oneOf.0.data.output_url","typeLabel":"string"}},"uniqueKey":"oneOf.0.data","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"oneOf.1.success","typeLabel":"boolean"},"data":{"type":"object","properties":{"output":{"type":"string","example":"Generated text content","uniqueKey":"oneOf.1.data.output","typeLabel":"string"}},"uniqueKey":"oneOf.1.data","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"status":"processing","data":{"id":"job-123","output_url":"https://api.videodb.io/async-response/job-123"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"679e0069-6979-4134-9862-536a1a914d94":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-access-token","description":"API key for authentication (sk-xxx format)","scopes":[]}}},"servers":{"a3dcbd38-5fbd-46aa-a172-ee74f897ac5a":{"url":"https://api.videodb.io","description":"Production server"},"f17c675b-6aaf-4314-96e0-90eac53742ae":{"url":"https://staging-api.videodb.io","description":"Staging server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-access-token","description":"API key for authentication (sk-xxx format)","scopes":[]},"schema":{"title":"x-access-token","type":"string","description":"API key for authentication (sk-xxx format)","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-access-token"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"videodb","siteName":"VideoDB Documentation","title":"Generate Text with AI - VideoDB Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-27T12:44:25.448Z","originalFileLocation":"api-reference/generation/generate_text.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate text content using AI language models for captions, scripts, and summaries\">\u003cmeta data-mint-head name=\"application-name\" content=\"VideoDB Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Text with AI - VideoDB Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate text content using AI language models for captions, scripts, and summaries\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VideoDB Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.videodb.io/api-reference/generation/generate_text\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://videodb.mintlify.site/_mintlify/api/og/v2?division=AI+Generation\u0026amp;title=Generate+Text+with+AI\u0026amp;description=Generate+text+content+using+AI+language+models+for+captions%2C+scripts%2C+and+summaries\u0026amp;theme=2920d5ecda04d88f90eeaa00\u0026amp;signature=16a659030117f64798da689a982919ae08cd78b5364f5dce6974f2ebca73b4d4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Text with AI - VideoDB Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate text content using AI language models for captions, scripts, and summaries\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://videodb.mintlify.site/_mintlify/api/og/v2?division=AI+Generation\u0026amp;title=Generate+Text+with+AI\u0026amp;description=Generate+text+content+using+AI+language+models+for+captions%2C+scripts%2C+and+summaries\u0026amp;theme=2920d5ecda04d88f90eeaa00\u0026amp;signature=16a659030117f64798da689a982919ae08cd78b5364f5dce6974f2ebca73b4d4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/videodb/m2QHSzY3st6NzBBu/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VideoDB Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ec601c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.videodb.io/api-reference/generation/generate_text\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/generation/generate_text.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.videodb.io/#organization\",\"name\":\"VideoDB Documentation\",\"url\":\"https://docs.videodb.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/videodb/GgiJu8HrYcTvfnRD/logo/light.svg?fit=max\u0026auto=format\u0026n=GgiJu8HrYcTvfnRD\u0026q=85\u0026s=613ed1f657ca517349000e89cf435607\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.videodb.io#website\",\"name\":\"VideoDB Documentation\",\"url\":\"https://docs.videodb.io\",\"publisher\":{\"@id\":\"https://docs.videodb.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.videodb.io/api-reference/generation/generate_text#webpage\",\"url\":\"https://docs.videodb.io/api-reference/generation/generate_text\",\"name\":\"Generate Text with AI\",\"description\":\"Generate text content using AI language models for captions, scripts, and summaries\",\"dateModified\":\"2026-08-27T12:44:25.448Z\",\"isPartOf\":{\"@id\":\"https://docs.videodb.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.videodb.io/api-reference/generation/generate_text#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.videodb.io/api-reference/generation/generate_text#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI Generation\",\"item\":\"https://docs.videodb.io/api-reference/generation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Text with AI\",\"item\":\"https://docs.videodb.io/api-reference/generation/generate_text\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.videodb.io/api-reference/generation/generate_text#apireference\",\"headline\":\"Generate Text with AI\",\"name\":\"Generate Text with AI\",\"description\":\"Generate text content using AI language models for captions, scripts, and summaries\",\"url\":\"https://docs.videodb.io/api-reference/generation/generate_text\",\"mainEntityOfPage\":{\"@id\":\"https://docs.videodb.io/api-reference/generation/generate_text#webpage\"},\"dateModified\":\"2026-08-27T12:44:25.448Z\",\"keywords\":\"ai-video-generation, text-to-video, text-to-speech, image-generation, music-generation, api-reference\",\"publisher\":{\"@id\":\"https://docs.videodb.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.videodb.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VideoDB Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"VideoDB Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/generation/generate_text.md","siteName":"VideoDB Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Examples \u0026 Tutorials","pages":[{"title":"Examples \u0026 Tutorials","href":"/examples-and-tutorials"}]},{"tab":"Research Lab","href":"https://labs.videodb.io"},{"tab":"Community \u0026 Resources","pages":[{"title":"Community \u0026 Resources","href":"/pages/community/about-us"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Reference","icon":"book-open","href":"/api-reference/introduction"}]},{"group":"Authentication","pages":[{"title":"Authentication","icon":"lock","href":"/api-reference/authentication/index"},{"title":"Create API Key","openapi":"POST /user/api_key","href":"/api-reference/authentication/create_api_key"},{"title":"List API Keys","openapi":"GET /user/api_key","href":"/api-reference/authentication/list_api_keys"},{"title":"Get User Info","openapi":"GET /user","href":"/api-reference/authentication/get_user"},{"title":"Delete API Key","openapi":"DELETE /user/api_key/{api_key}","href":"/api-reference/authentication/delete_api_key"},{"title":"Set API Key Collections","openapi":"PUT /user/api-key-collections","href":"/api-reference/authentication/set_api_key_collections"}]},{"group":"Collections","pages":[{"title":"Collections","icon":"folder","href":"/api-reference/collections/index"},{"title":"Create Collection","openapi":"POST /collection","href":"/api-reference/collections/create_collection"},{"title":"List Collections","openapi":"GET /collection","href":"/api-reference/collections/list_collections"},{"title":"Get Collection","openapi":"GET /collection/{collection_id}","href":"/api-reference/collections/get_collection"},{"title":"Update Collection","openapi":"PATCH /collection/{collection_id}","href":"/api-reference/collections/update_collection"},{"title":"Delete Collection","openapi":"DELETE /collection/{collection_id}","href":"/api-reference/collections/delete_collection"},{"title":"Upload to Collection","openapi":"POST /collection/{collection_id}/upload","href":"/api-reference/collections/upload_to_collection"},{"title":"Legacy Collection Search","openapi":"POST /collection/{collection_id}/search/","href":"/api-reference/collections/search_collections"},{"title":"Get Upload URL","openapi":"GET /collection/{collection_id}/upload_url","href":"/api-reference/collections/get_upload_url"},{"title":"Get WebSocket URL","openapi":"GET /collection/{collection_id}/websocket","href":"/api-reference/collections/get_websocket"},{"title":"Search by Title","openapi":"POST /collection/{collection_id}/search/title/","href":"/api-reference/collections/search_title"},{"title":"Web Search","openapi":"POST /collection/{collection_id}/search/web/","href":"/api-reference/collections/search_web"}]},{"group":"Videos","pages":[{"title":"Videos","icon":"film","href":"/api-reference/videos/index"},{"title":"List Videos","openapi":"GET /video/","href":"/api-reference/videos/list_videos"},{"title":"Get Video Details","openapi":"GET /video/{video_id}","href":"/api-reference/videos/get_video"},{"title":"Delete Video","openapi":"DELETE /video/{video_id}","href":"/api-reference/videos/delete_video"},{"title":"Delete Video Storage","openapi":"DELETE /video/{video_id}/storage/","href":"/api-reference/videos/delete_video_storage"},{"title":"Update Video","openapi":"PATCH /video/{video_id}","href":"/api-reference/videos/update_video"}]},{"group":"Streaming \u0026 Playback","pages":[{"title":"Streaming \u0026 Playback","icon":"play","href":"/api-reference/videos/streaming/index"},{"title":"Create Custom Thumbnail","openapi":"POST /video/{video_id}/thumbnail/","href":"/api-reference/videos/streaming/create_video_thumbnail"},{"title":"List Video Thumbnails","openapi":"GET /video/{video_id}/thumbnails/","href":"/api-reference/videos/streaming/list_video_thumbnails"},{"title":"Get Video Thumbnail","openapi":"GET /video/{video_id}/thumbnail/","href":"/api-reference/videos/streaming/get_video_thumbnail"},{"title":"Generate Video Stream","openapi":"POST /video/{video_id}/stream/","href":"/api-reference/videos/streaming/generate_video_stream"}]},{"group":"Transcription","pages":[{"title":"Transcription","icon":"type","href":"/api-reference/videos/transcription/index"},{"title":"Create Video Transcription","openapi":"POST /video/{video_id}/transcription/","href":"/api-reference/videos/transcription/create_video_transcription"},{"title":"Get Video Transcription","openapi":"GET /video/{video_id}/transcription/","href":"/api-reference/videos/transcription/get_video_transcription"}]},{"group":"Search V2 \u0026 Ask","pages":[{"title":"Search V2 \u0026 Ask","icon":"search","href":"/api-reference/search-v2/index"},{"title":"High-level Search \u0026 DeepSearch","icon":"search","href":"/api-reference/search-v2/search"},{"title":"Semantic Search","icon":"search","href":"/api-reference/search-v2/semantic-search"},{"title":"Query","icon":"filter","href":"/api-reference/search-v2/query"},{"title":"Aggregate","icon":"chart-bar","href":"/api-reference/search-v2/aggregate"},{"title":"Ask","icon":"message-square","href":"/api-reference/search-v2/ask"},{"title":"Legacy Search","icon":"history","href":"/api-reference/search-v2/legacy-search"}]},{"group":"Legacy Video Indexing \u0026 Search","pages":[{"title":"Indexing \u0026 Search","icon":"layers","href":"/api-reference/videos/indexing/index"},{"title":"Create Spoken Word Index","openapi":"POST /video/{video_id}/index/","href":"/api-reference/videos/indexing/create_video_index"},{"title":"Get Video Index","openapi":"GET /video/{video_id}/index/","href":"/api-reference/videos/indexing/get_video_index"},{"title":"Create Scene Index","openapi":"POST /video/{video_id}/index/scene/","href":"/api-reference/videos/indexing/create_scene_index"},{"title":"List Scene Indexes","openapi":"GET /video/{video_id}/index/scene/","href":"/api-reference/videos/indexing/list_scene_indexes"},{"title":"Get Scene Index Details","openapi":"GET /video/{video_id}/index/scene/{scene_index_id}","href":"/api-reference/videos/indexing/get_scene_index"},{"title":"Delete Scene Index","openapi":"DELETE /video/{video_id}/index/scene/{scene_index_id}","href":"/api-reference/videos/indexing/delete_scene_index"},{"title":"Search Video","openapi":"POST /video/{video_id}/search/","href":"/api-reference/videos/indexing/search_video_index"},{"title":"Delete Video Index","openapi":"POST /video/{video_id}/index/delete","href":"/api-reference/videos/indexing/delete_video_index"}]},{"group":"Scene \u0026 Frame Analysis","pages":[{"title":"Scene \u0026 Frame Analysis","icon":"camera","href":"/api-reference/videos/scenes/index"},{"title":"Extract Video Scenes","openapi":"POST /video/{video_id}/scenes/","href":"/api-reference/videos/scenes/extract_video_scenes"},{"title":"Get Video Scenes","openapi":"GET /video/{video_id}/scenes/","href":"/api-reference/videos/scenes/get_video_scenes"},{"title":"Describe Video Scene","openapi":"POST /video/{video_id}/scene/{scene_id}/describe/","href":"/api-reference/videos/scenes/describe_video_scene"},{"title":"Describe Video Frame","openapi":"POST /video/{video_id}/frame/{frame_id}/describe/","href":"/api-reference/videos/scenes/describe_video_frame"},{"title":"Get Scene Collection","openapi":"GET /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/scenes/get_scene_collection"},{"title":"Update Scene Collection","openapi":"PATCH /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/scenes/update_scene_collection"},{"title":"Delete Scene Collection","openapi":"DELETE /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/scenes/delete_scene_collection"}]},{"group":"Advanced Operations","pages":[{"title":"Advanced Operations","icon":"settings","href":"/api-reference/videos/advanced/index"},{"title":"Create Video Clip","openapi":"POST /video/{video_id}/clip","href":"/api-reference/videos/advanced/create_video_clip"},{"title":"Execute Video Workflow","openapi":"POST /video/{video_id}/workflow/","href":"/api-reference/videos/advanced/create_video_workflow"},{"title":"Reframe Video","openapi":"POST /video/{video_id}/reframe","href":"/api-reference/videos/advanced/reframe_video"},{"title":"Get Reframe Status","openapi":"GET /video/{video_id}/reframe/{reframe_id}","href":"/api-reference/videos/advanced/get_reframe_status"}]},{"group":"Audio","pages":[{"title":"Audio","icon":"music","href":"/api-reference/audio/index"},{"title":"List All Audio Files","openapi":"GET /audio/","href":"/api-reference/audio/list_audio"},{"title":"Get Audio Details","openapi":"GET /audio/{audio_id}","href":"/api-reference/audio/get_audio"},{"title":"Delete Audio File","openapi":"DELETE /audio/{audio_id}","href":"/api-reference/audio/delete_audio"},{"title":"Generate Audio URL","openapi":"POST /audio/{audio_id}/generate_url","href":"/api-reference/audio/generate_audio_url"},{"title":"Update Audio","openapi":"PATCH /audio/{audio_id}","href":"/api-reference/audio/update_audio"},{"title":"Create Audio Transcription","openapi":"POST /audio/{audio_id}/transcription/","href":"/api-reference/audio/create_audio_transcription"},{"title":"Get Audio Transcription","openapi":"GET /audio/{audio_id}/transcription/","href":"/api-reference/audio/get_audio_transcription"}]},{"group":"Images","pages":[{"title":"Images","icon":"image","href":"/api-reference/images/index"},{"title":"List All Images","openapi":"GET /image/","href":"/api-reference/images/list_images"},{"title":"Get Image Details","openapi":"GET /image/{image_id}","href":"/api-reference/images/get_image"},{"title":"Delete Image","openapi":"DELETE /image/{image_id}","href":"/api-reference/images/delete_image"},{"title":"Generate Image URL","openapi":"POST /image/{image_id}/generate_url","href":"/api-reference/images/generate_image_url"},{"title":"Update Image","openapi":"PATCH /image/{image_id}","href":"/api-reference/images/update_image"}]},{"group":"AI Generation","pages":[{"title":"AI Generation","icon":"wand","href":"/api-reference/generation/index"},{"title":"Generate Image with AI","openapi":"POST /collection/{collection_id}/generate/image/","href":"/api-reference/generation/generate_image"},{"title":"Generate Video with AI","openapi":"POST /collection/{collection_id}/generate/video/","href":"/api-reference/generation/generate_video"},{"title":"Generate Audio with AI","openapi":"POST /collection/{collection_id}/generate/audio/","description":"Generate audio, music, and voice content using AI models","href":"/api-reference/generation/generate_audio"},{"title":"Generate Text with AI","openapi":"POST /collection/{collection_id}/generate/text/","href":"/api-reference/generation/generate_text"},{"title":"Dub Video","openapi":"POST /collection/{collection_id}/generate/video/dub","description":"Dub a video with AI-generated audio in a different language","href":"/api-reference/generation/dub_video"},{"title":"Translate Video","openapi":"POST /collection/{collection_id}/video/{video_id}/translate","href":"/api-reference/generation/translate_video"}]},{"group":"Sandbox","pages":[{"title":"Create Sandbox","openapi":"POST /sandbox","href":"/api-reference/sandbox/create_sandbox"},{"title":"List Sandboxes","openapi":"GET /sandbox","href":"/api-reference/sandbox/list_sandboxes"},{"title":"Get Sandbox","openapi":"GET /sandbox/{sandbox_id}","href":"/api-reference/sandbox/get_sandbox"},{"title":"Stop Sandbox","openapi":"POST /sandbox/{sandbox_id}/stop","href":"/api-reference/sandbox/stop_sandbox"},{"title":"Get Job","openapi":"GET /job/{job_id}","href":"/api-reference/sandbox/get_job"}]},{"group":"Timeline \u0026 Compilation","pages":[{"title":"Timeline \u0026 Compilation","icon":"list","href":"/api-reference/timeline/index"},{"title":"Create Timeline (v1)","openapi":"POST /timeline","href":"/api-reference/timeline/create_timeline"},{"title":"Create Timeline (v2)","openapi":"POST /timeline_v2","href":"/api-reference/timeline/create_timeline_v2"},{"title":"Download Timeline Video","openapi":"POST /timeline_v2/download","href":"/api-reference/timeline/download_timeline"},{"title":"Compile Search Results","openapi":"POST /compile/","href":"/api-reference/timeline/compile_timeline"}]},{"group":"Billing","pages":[{"title":"Billing","icon":"credit-card","href":"/api-reference/billing/index"},{"title":"List Checkout Sessions","openapi":"GET /billing/checkouts","href":"/api-reference/billing/list_checkouts"},{"title":"Get Usage Statistics","openapi":"GET /billing/usage","href":"/api-reference/billing/get_usage"},{"title":"List Invoices","openapi":"GET /billing/invoices","href":"/api-reference/billing/list_invoices"},{"title":"Get Auto-Recharge Settings","openapi":"GET /billing/auto_recharge","href":"/api-reference/billing/get_auto_recharge"},{"title":"Configure Auto-Recharge","openapi":"POST /billing/auto_recharge","href":"/api-reference/billing/set_auto_recharge"},{"title":"Create Checkout Session","openapi":"POST /billing/checkout","href":"/api-reference/billing/create_checkout"},{"title":"Manual Credit Top-up","openapi":"POST /billing/topup","href":"/api-reference/billing/create_topup"}]},{"group":"Downloads","pages":[{"title":"Downloads","icon":"download","href":"/api-reference/downloads/index"},{"title":"Create Download Job","openapi":"POST /download","href":"/api-reference/downloads/create_download"},{"title":"List Download Jobs","openapi":"GET /download","href":"/api-reference/downloads/list_downloads"},{"title":"Get Download Status","openapi":"GET /download/{download_id}","href":"/api-reference/downloads/get_download"},{"title":"Update Download Job","openapi":"POST /download/{download_id}","href":"/api-reference/downloads/update_download"},{"title":"Delete Download Job","openapi":"DELETE /download","href":"/api-reference/downloads/delete_download"}]},{"group":"Utilities","pages":[{"title":"Utilities","icon":"wrench","href":"/api-reference/utilities/index"},{"title":"API Health Check","openapi":"GET /","href":"/api-reference/utilities/health_check"},{"title":"Get Async Response","openapi":"GET /async-response/{response_id}","href":"/api-reference/utilities/get_async_response"},{"title":"Chat Completions","openapi":"POST /chat/completions","href":"/api-reference/utilities/create_chat"}]},{"group":"Assets","pages":[{"title":"Assets","icon":"images","href":"/api-reference/assets/index"},{"title":"List Assets","openapi":"GET /assets","href":"/api-reference/assets/list_assets"}]},{"group":"Editor","pages":[{"title":"Editor","icon":"film","href":"/api-reference/editor/index"},{"title":"Compile Editor Timeline","openapi":"POST /editor","href":"/api-reference/editor/compile_editor_timeline"},{"title":"Download Editor Timeline","openapi":"POST /editor/download","href":"/api-reference/editor/download_editor_timeline"}]},{"group":"Transcode","pages":[{"title":"Transcode","icon":"repeat","href":"/api-reference/transcode/index"},{"title":"Start Transcode","openapi":"POST /transcode","href":"/api-reference/transcode/start_transcode"},{"title":"Get Transcode Status","openapi":"GET /transcode/{job_id}","href":"/api-reference/transcode/get_transcode_status"}]},{"group":"Meeting","pages":[{"title":"Meeting","icon":"users","href":"/api-reference/meeting/index"},{"title":"Record Meeting","openapi":"POST /collection/{collection_id}/meeting/record","href":"/api-reference/meeting/record_meeting"},{"title":"Get Meeting","openapi":"GET /collection/{collection_id}/meeting/{bot_id}","href":"/api-reference/meeting/get_meeting"},{"title":"Get Meeting by Video","openapi":"GET /video/{video_id}/meeting","href":"/api-reference/meeting/get_meeting_by_video"}]},{"group":"Capture","pages":[{"title":"Capture","icon":"video","href":"/api-reference/capture/index"},{"title":"Create Capture Session","openapi":"POST /collection/{collection_id}/capture/session","href":"/api-reference/capture/create_session"},{"title":"List Capture Sessions","openapi":"GET /collection/{collection_id}/capture/session","href":"/api-reference/capture/list_sessions"},{"title":"Get Capture Session","openapi":"GET /collection/{collection_id}/capture/session/{session_id}","href":"/api-reference/capture/get_session"},{"title":"Create Session Token","openapi":"POST /capture/session/token","href":"/api-reference/capture/create_session_token"},{"title":"Start Capture Session","openapi":"POST /capture/session/start","href":"/api-reference/capture/start_session"},{"title":"Get Streaming Session","openapi":"GET /capture/session/{streaming_session_id}","href":"/api-reference/capture/get_streaming_session"},{"title":"Stop Capture Session","openapi":"POST /capture/session/{streaming_session_id}/stop","href":"/api-reference/capture/stop_session"}]},{"group":"RTStream","pages":[{"title":"RTStream","icon":"rss","href":"/api-reference/rtstream/index"},{"title":"List RTStreams","openapi":"GET /rtstream/","href":"/api-reference/rtstream/list_rtstreams"},{"title":"Create RTStream","openapi":"POST /rtstream/","href":"/api-reference/rtstream/create_rtstream"},{"title":"Get RTStream","openapi":"GET /rtstream/{stream_id}/","href":"/api-reference/rtstream/get_rtstream"},{"title":"Update RTStream","openapi":"PATCH /rtstream/{stream_id}/","href":"/api-reference/rtstream/update_rtstream"},{"title":"Update RTStream Status","openapi":"PATCH /rtstream/{stream_id}/status/","href":"/api-reference/rtstream/update_rtstream_status"},{"title":"Export RTStream","openapi":"POST /rtstream/{stream_id}/export","href":"/api-reference/rtstream/export_rtstream"},{"title":"Get RTStream Playback URL","openapi":"GET /rtstream/{stream_id}/stream","href":"/api-reference/rtstream/get_rtstream_stream"},{"title":"Search RTStream","openapi":"POST /rtstream/{stream_id}/search","href":"/api-reference/rtstream/scene-indexing/search_rtstream"}]},{"group":"RTStream Transcription","pages":[{"title":"RTStream Transcription","icon":"volume","href":"/api-reference/rtstream/transcription/index"},{"title":"Get RTStream Transcription","openapi":"GET /rtstream/{stream_id}/transcription/","href":"/api-reference/rtstream/transcription/get_rtstream_transcription"},{"title":"Manage RTStream Transcription","openapi":"POST /rtstream/{stream_id}/transcription/","href":"/api-reference/rtstream/transcription/manage_rtstream_transcription"},{"title":"Get RTStream Transcription Status","openapi":"GET /rtstream/{stream_id}/transcription/status","href":"/api-reference/rtstream/transcription/get_rtstream_transcription_status"}]},{"group":"Legacy RTStream Scene Indexing","pages":[{"title":"RTStream Scene Indexing","icon":"eye","href":"/api-reference/rtstream/scene-indexing/index"},{"title":"Create RTStream Scene Index","openapi":"POST /rtstream/{stream_id}/index/scene","href":"/api-reference/rtstream/scene-indexing/create_rtstream_scene_index"},{"title":"List RTStream Scene Indexes","openapi":"GET /rtstream/{stream_id}/index/scene","href":"/api-reference/rtstream/scene-indexing/list_rtstream_scene_indexes"},{"title":"Get RTStream Scene Index","openapi":"GET /rtstream/{stream_id}/index/{scene_index_id}","href":"/api-reference/rtstream/scene-indexing/get_rtstream_scene_index"},{"title":"Get RTStream Scene Records","openapi":"GET /rtstream/{stream_id}/index/scene/{scene_index_id}","href":"/api-reference/rtstream/scene-indexing/get_rtstream_scene_records"},{"title":"Update RTStream Scene Index","openapi":"PATCH /rtstream/{stream_id}/index/scene/{scene_index_id}","href":"/api-reference/rtstream/scene-indexing/update_rtstream_scene_index"},{"title":"Update RTStream Scene Index Status","openapi":"PATCH /rtstream/{stream_id}/index/scene/{scene_index_id}/status","href":"/api-reference/rtstream/scene-indexing/update_rtstream_scene_index_status"}]},{"group":"RTStream Events","pages":[{"title":"RTStream Events","icon":"bell","href":"/api-reference/rtstream/events-alerts/index"},{"title":"Create Event","openapi":"POST /rtstream/event","href":"/api-reference/rtstream/events-alerts/create_event"},{"title":"List Events","openapi":"GET /rtstream/event","href":"/api-reference/rtstream/events-alerts/list_events"}]},{"group":"Legacy RTStream Alerts","pages":[{"title":"Create Alert","openapi":"POST /rtstream/{stream_id}/index/{scene_index_id}/alert","href":"/api-reference/rtstream/events-alerts/create_alert"},{"title":"List Alerts","openapi":"GET /rtstream/{stream_id}/index/{scene_index_id}/alert","href":"/api-reference/rtstream/events-alerts/list_alerts"},{"title":"Update Alert Status","openapi":"PATCH /rtstream/{stream_id}/index/{scene_index_id}/alert/{alert_id}/status","href":"/api-reference/rtstream/events-alerts/update_alert_status"}]},{"group":"API Reference","pages":[{"title":"Get service information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /","href":"/api-reference/get-service-information"},{"title":"Get user information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /user","href":"/api-reference/get-user-information"},{"title":"Get user API keys","deprecated":null,"version":null,"openapi":"/openapi.yaml get /user/api_key","href":"/api-reference/get-user-api-keys"},{"title":"Create new API key","deprecated":null,"version":null,"openapi":"/openapi.yaml post /user/api_key","href":"/api-reference/create-new-api-key"},{"title":"Delete API key","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /user/api_key/{api_key}","href":"/api-reference/delete-api-key"},{"title":"Get user collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection","href":"/api-reference/get-user-collections"},{"title":"Create new collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection","href":"/api-reference/create-new-collection"},{"title":"Get collection details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}","href":"/api-reference/get-collection-details"},{"title":"Delete collection","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /collection/{collection_id}","href":"/api-reference/delete-collection"},{"title":"Update collection","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /collection/{collection_id}","href":"/api-reference/update-collection"},{"title":"Upload media to collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/upload","href":"/api-reference/upload-media-to-collection"},{"title":"Search within collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/search/","href":"/api-reference/search-within-collection"},{"title":"List videos","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/","href":"/api-reference/list-videos"},{"title":"Get video details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}","href":"/api-reference/get-video-details"},{"title":"Delete video","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /video/{video_id}","href":"/api-reference/delete-video"},{"title":"Delete video storage","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /video/{video_id}/storage/","href":"/api-reference/delete-video-storage"},{"title":"Create video stream","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/stream/","href":"/api-reference/create-video-stream"},{"title":"Get video thumbnail","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/thumbnail/","href":"/api-reference/get-video-thumbnail"},{"title":"Generate custom thumbnail","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/thumbnail/","href":"/api-reference/generate-custom-thumbnail"},{"title":"Get all video thumbnails","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/thumbnails/","href":"/api-reference/get-all-video-thumbnails"},{"title":"Get video transcription","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/transcription/","href":"/api-reference/get-video-transcription"},{"title":"Generate video transcription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/transcription/","href":"/api-reference/generate-video-transcription"},{"title":"Get video index status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/index/","href":"/api-reference/get-video-index-status"},{"title":"Create video index","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/index/","href":"/api-reference/create-video-index"},{"title":"Search within video","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/search/","href":"/api-reference/search-within-video"},{"title":"Get video scenes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/scenes/","href":"/api-reference/get-video-scenes"},{"title":"Create video scenes","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/scenes/","href":"/api-reference/create-video-scenes"},{"title":"Describe video scene","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/scene/{scene_id}/describe/","href":"/api-reference/describe-video-scene"},{"title":"Describe video frame","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/frame/{frame_id}/describe/","href":"/api-reference/describe-video-frame"},{"title":"Generate video clip","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/clip","href":"/api-reference/generate-video-clip"},{"title":"Execute video workflow","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/workflow/","href":"/api-reference/execute-video-workflow"},{"title":"List audios","deprecated":null,"version":null,"openapi":"/openapi.yaml get /audio/","href":"/api-reference/list-audios"},{"title":"Get audio details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /audio/{audio_id}","href":"/api-reference/get-audio-details"},{"title":"Delete audio","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /audio/{audio_id}","href":"/api-reference/delete-audio"},{"title":"Generate audio stream URL","deprecated":null,"version":null,"openapi":"/openapi.yaml post /audio/{audio_id}/generate_url","href":"/api-reference/generate-audio-stream-url"},{"title":"List images","deprecated":null,"version":null,"openapi":"/openapi.yaml get /image/","href":"/api-reference/list-images"},{"title":"Get image details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /image/{image_id}","href":"/api-reference/get-image-details"},{"title":"Delete image","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /image/{image_id}","href":"/api-reference/delete-image"},{"title":"Generate image URL","deprecated":null,"version":null,"openapi":"/openapi.yaml post /image/{image_id}/generate_url","href":"/api-reference/generate-image-url"},{"title":"Generate image using AI","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/generate/image/","href":"/api-reference/generate-image-using-ai"},{"title":"Generate video using AI","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/generate/video/","href":"/api-reference/generate-video-using-ai"},{"title":"Generate audio using AI","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/generate/audio/","href":"/api-reference/generate-audio-using-ai"},{"title":"Get self-inference generation job status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /job/{job_id}","href":"/api-reference/get-self-inference-generation-job-status"},{"title":"Generate text using AI","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/generate/text/","href":"/api-reference/generate-text-using-ai"},{"title":"Compile timeline","deprecated":null,"version":null,"openapi":"/openapi.yaml post /timeline","href":"/api-reference/compile-timeline"},{"title":"Get billing usage information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /billing/usage","href":"/api-reference/get-billing-usage-information"},{"title":"Create billing checkout session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /billing/checkout","href":"/api-reference/create-billing-checkout-session"},{"title":"Get billing checkout history","deprecated":null,"version":null,"openapi":"/openapi.yaml get /billing/checkouts","href":"/api-reference/get-billing-checkout-history"},{"title":"Get billing invoices","deprecated":null,"version":null,"openapi":"/openapi.yaml get /billing/invoices","href":"/api-reference/get-billing-invoices"},{"title":"Create topup payment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /billing/topup","href":"/api-reference/create-topup-payment"},{"title":"Get auto recharge settings","deprecated":null,"version":null,"openapi":"/openapi.yaml get /billing/auto_recharge","href":"/api-reference/get-auto-recharge-settings"},{"title":"Update auto recharge settings","deprecated":null,"version":null,"openapi":"/openapi.yaml post /billing/auto_recharge","href":"/api-reference/update-auto-recharge-settings"},{"title":"Get async operation result","deprecated":null,"version":null,"openapi":"/openapi.yaml get /async-response/{response_id}","href":"/api-reference/get-async-operation-result"},{"title":"List download entries","deprecated":null,"version":null,"openapi":"/openapi.yaml get /download","href":"/api-reference/list-download-entries"},{"title":"Create download request","deprecated":null,"version":null,"openapi":"/openapi.yaml post /download","href":"/api-reference/create-download-request"},{"title":"Delete download entry","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /download","href":"/api-reference/delete-download-entry"},{"title":"Get download status/details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /download/{download_id}","href":"/api-reference/get-download-statusdetails"},{"title":"Retry download","deprecated":null,"version":null,"openapi":"/openapi.yaml post /download/{download_id}","href":"/api-reference/retry-download"},{"title":"OpenAI-compatible chat completions proxy","deprecated":null,"version":null,"openapi":"/openapi.yaml post /chat/completions","href":"/api-reference/openai-compatible-chat-completions-proxy"},{"title":"Compile timeline (v2)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /timeline_v2","href":"/api-reference/compile-timeline-v2"},{"title":"Download compiled timeline","deprecated":null,"version":null,"openapi":"/openapi.yaml post /timeline_v2/download","href":"/api-reference/download-compiled-timeline"},{"title":"Compile media content","deprecated":null,"version":null,"openapi":"/openapi.yaml post /compile/","href":"/api-reference/compile-media-content"},{"title":"Get video scene index status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/index/scene/","href":"/api-reference/get-video-scene-index-status"},{"title":"Create video scene index","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/index/scene/","href":"/api-reference/create-video-scene-index"},{"title":"Get scene index details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/index/scene/{scene_index_id}","href":"/api-reference/get-scene-index-details"},{"title":"Delete scene index","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /video/{video_id}/index/scene/{scene_index_id}","href":"/api-reference/delete-scene-index"}]},{"group":"Videos","pages":[{"title":"Update video","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /video/{video_id}","href":"/api-reference/videos/update-video"},{"title":"Get scene collection details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/get-scene-collection-details"},{"title":"Delete scene collection","deprecated":null,"version":null,"openapi":"/openapi.yaml delete /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/delete-scene-collection"},{"title":"Update scene collection","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /video/{video_id}/scenes/{scene_collection_id}/","href":"/api-reference/videos/update-scene-collection"},{"title":"Delete video index","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/index/delete","href":"/api-reference/videos/delete-video-index"},{"title":"Reframe video to different aspect ratio","deprecated":null,"version":null,"openapi":"/openapi.yaml post /video/{video_id}/reframe","href":"/api-reference/videos/reframe-video-to-different-aspect-ratio"},{"title":"Get reframe job status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/reframe/{reframe_id}","href":"/api-reference/videos/get-reframe-job-status"}]},{"group":"Audio","pages":[{"title":"Update audio","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /audio/{audio_id}","href":"/api-reference/audio/update-audio"},{"title":"Get audio transcription","deprecated":null,"version":null,"openapi":"/openapi.yaml get /audio/{audio_id}/transcription/","href":"/api-reference/audio/get-audio-transcription"},{"title":"Generate audio transcription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /audio/{audio_id}/transcription/","href":"/api-reference/audio/generate-audio-transcription"}]},{"group":"Images","pages":[{"title":"Update image","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /image/{image_id}","href":"/api-reference/images/update-image"}]},{"group":"Sandbox","pages":[{"title":"List Sandbox Compute pools","deprecated":null,"version":null,"openapi":"/openapi.yaml get /sandbox","href":"/api-reference/sandbox/list-sandbox-compute-pools"},{"title":"Create a Sandbox Compute pool","deprecated":null,"version":null,"openapi":"/openapi.yaml post /sandbox","href":"/api-reference/sandbox/create-a-sandbox-compute-pool"},{"title":"Get a Sandbox Compute pool","deprecated":null,"version":null,"openapi":"/openapi.yaml get /sandbox/{sandbox_id}","href":"/api-reference/sandbox/get-a-sandbox-compute-pool"},{"title":"Stop a Sandbox Compute pool","deprecated":null,"version":null,"openapi":"/openapi.yaml post /sandbox/{sandbox_id}/stop","href":"/api-reference/sandbox/stop-a-sandbox-compute-pool"}]},{"group":"Collections","pages":[{"title":"Get presigned upload URL","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}/upload_url","href":"/api-reference/collections/get-presigned-upload-url"},{"title":"Get WebSocket connection URL","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}/websocket","href":"/api-reference/collections/get-websocket-connection-url"}]},{"group":"Search","pages":[{"title":"Search by title within collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/search/title/","href":"/api-reference/search/search-by-title-within-collection"},{"title":"Web search within collection","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/search/web/","href":"/api-reference/search/web-search-within-collection"}]},{"group":"AI Generation","pages":[{"title":"Dub video with AI-generated audio","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/generate/video/dub","href":"/api-reference/ai-generation/dub-video-with-ai-generated-audio"},{"title":"Translate video content","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/video/{video_id}/translate","href":"/api-reference/ai-generation/translate-video-content"}]},{"group":"Assets","pages":[{"title":"List all assets across collections","deprecated":null,"version":null,"openapi":"/openapi.yaml get /assets","href":"/api-reference/assets/list-all-assets-across-collections"}]},{"group":"Authentication","pages":[{"title":"Set API key collection scoping","deprecated":null,"version":null,"openapi":"/openapi.yaml put /user/api-key-collections","href":"/api-reference/authentication/set-api-key-collection-scoping"}]},{"group":"Editor","pages":[{"title":"Compile editor timeline","deprecated":null,"version":null,"openapi":"/openapi.yaml post /editor","href":"/api-reference/editor/compile-editor-timeline"},{"title":"Download compiled editor timeline","deprecated":null,"version":null,"openapi":"/openapi.yaml post /editor/download","href":"/api-reference/editor/download-compiled-editor-timeline"}]},{"group":"Transcode","pages":[{"title":"Start transcode job","deprecated":null,"version":null,"openapi":"/openapi.yaml post /transcode","href":"/api-reference/transcode/start-transcode-job"},{"title":"Get transcode job status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /transcode/{job_id}","href":"/api-reference/transcode/get-transcode-job-status"}]},{"group":"Meeting","pages":[{"title":"Record a meeting","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/meeting/record","href":"/api-reference/meeting/record-a-meeting"},{"title":"Get meeting recording information","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}/meeting/{bot_id}","href":"/api-reference/meeting/get-meeting-recording-information"},{"title":"Get meeting by video","deprecated":null,"version":null,"openapi":"/openapi.yaml get /video/{video_id}/meeting","href":"/api-reference/meeting/get-meeting-by-video"}]},{"group":"Capture","pages":[{"title":"List capture sessions","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}/capture/session","href":"/api-reference/capture/list-capture-sessions"},{"title":"Create capture session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /collection/{collection_id}/capture/session","href":"/api-reference/capture/create-capture-session"},{"title":"Get capture session details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /collection/{collection_id}/capture/session/{session_id}","href":"/api-reference/capture/get-capture-session-details"},{"title":"Create capture session token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /capture/session/token","href":"/api-reference/capture/create-capture-session-token"},{"title":"Start capture session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /capture/session/start","href":"/api-reference/capture/start-capture-session"},{"title":"Get capture session with RTSP URLs","deprecated":null,"version":null,"openapi":"/openapi.yaml get /capture/session/{streaming_session_id}","href":"/api-reference/capture/get-capture-session-with-rtsp-urls"},{"title":"Stop capture session","deprecated":null,"version":null,"openapi":"/openapi.yaml post /capture/session/{streaming_session_id}/stop","href":"/api-reference/capture/stop-capture-session"}]},{"group":"RTStream","pages":[{"title":"List RTStreams","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/","href":"/api-reference/rtstream/list-rtstreams"},{"title":"Create RTStream","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/","href":"/api-reference/rtstream/create-rtstream"},{"title":"Get RTStream details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/","href":"/api-reference/rtstream/get-rtstream-details"},{"title":"Update RTStream","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /rtstream/{stream_id}/","href":"/api-reference/rtstream/update-rtstream"},{"title":"Start or stop RTStream","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /rtstream/{stream_id}/status/","href":"/api-reference/rtstream/start-or-stop-rtstream"},{"title":"Export RTStream recording as VideoDB asset","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/{stream_id}/export","href":"/api-reference/rtstream/export-rtstream-recording-as-videodb-asset"},{"title":"List RTStream scene indexes","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/index/scene","href":"/api-reference/rtstream/list-rtstream-scene-indexes"},{"title":"Create RTStream scene index","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/{stream_id}/index/scene","href":"/api-reference/rtstream/create-rtstream-scene-index"},{"title":"Get RTStream scene index details","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/index/{scene_index_id}","href":"/api-reference/rtstream/get-rtstream-scene-index-details"},{"title":"Get RTStream scene records","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/index/scene/{scene_index_id}","href":"/api-reference/rtstream/get-rtstream-scene-records"},{"title":"Update RTStream scene index prompt","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /rtstream/{stream_id}/index/scene/{scene_index_id}","href":"/api-reference/rtstream/update-rtstream-scene-index-prompt"},{"title":"Update RTStream scene index status","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /rtstream/{stream_id}/index/scene/{scene_index_id}/status","href":"/api-reference/rtstream/update-rtstream-scene-index-status"},{"title":"Search RTStream scene index","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/{stream_id}/search","href":"/api-reference/rtstream/search-rtstream-scene-index"},{"title":"Get RTStream playback URL","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/stream","href":"/api-reference/rtstream/get-rtstream-playback-url"},{"title":"Get RTStream transcription data","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/transcription/","href":"/api-reference/rtstream/get-rtstream-transcription-data"},{"title":"Start or stop RTStream transcription","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/{stream_id}/transcription/","href":"/api-reference/rtstream/start-or-stop-rtstream-transcription"},{"title":"Get RTStream transcription status","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/transcription/status","href":"/api-reference/rtstream/get-rtstream-transcription-status"},{"title":"List collection events","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/event","href":"/api-reference/rtstream/list-collection-events"},{"title":"Create collection event","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/event","href":"/api-reference/rtstream/create-collection-event"},{"title":"List RTStream alerts","deprecated":null,"version":null,"openapi":"/openapi.yaml get /rtstream/{stream_id}/index/{scene_index_id}/alert","href":"/api-reference/rtstream/list-rtstream-alerts"},{"title":"Create RTStream alert","deprecated":null,"version":null,"openapi":"/openapi.yaml post /rtstream/{stream_id}/index/{scene_index_id}/alert","href":"/api-reference/rtstream/create-rtstream-alert"},{"title":"Update RTStream alert status","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /rtstream/{stream_id}/index/{scene_index_id}/alert/{alert_id}/status","href":"/api-reference/rtstream/update-rtstream-alert-status"}]}]}]},"basePath":"","title":"Generate Text with AI - VideoDB Documentation","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}