Tikway API Key. Passed through the x-goog-api-key request header according to the Gemini native protocol.
Body
application/json
Create a request body for cached content. The cached content is preprocessed and can be reused in subsequent build requests. The cache can only be used for the model specified when it was created.
The name of the model resource used to create and use this cache. The cache can only be used for the models specified here, in the format models/{model}. This field is required and cannot be modified after creation.
A list of content that needs to be cached. It can contain a single round of content, or it can contain multiple historical rounds of content in dialogue order. This field is for input only and cannot be modified after the cache is created.
A list of parts that make up the current content. Each Part can represent text, inline files, uploaded files, function calls, function responses, or code execution information.
Indicates whether the current Part belongs to the thinking content of the model. Usually generated by the server, the original value should be maintained when returning historical content.
A signature of what the model thinks about. The historical content of the model should be kept intact when returned and should not be modified or generated by the client.
A list of tools that the model can use when subsequently generating content. This field is for input only and cannot be modified after the cache is created.
Absolute time of cache expiration, using RFC 3339 format. The server output will be normalized to UTC time. This field is mutually exclusive with ttl, at most one of them can be set.
The relative validity period of the cache, in seconds, supports up to 9 decimal places, and ends with s. This field is for input only and is mutually exclusive with expireTime.
A human-readable name set by the user for the cached content, containing up to 128 Unicode characters. This field cannot be modified after the cache is created.
System commands set by the developer. Currently only plain text Parts are supported. This field is for input only and cannot be modified after the cache is created.
Function calling pattern. MODE_UNSPECIFIED means unspecified and not recommended; AUTO means the model can return text or call a function at its discretion; ANY means the model must call a function; NONE means function calls are prohibited; VALIDATED means the model can return text or call a constraint-validated function.
A list of function names that the model is allowed to call. Should only be set when mode is ANY or VALIDATED, and the name must match the function name in functionDeclarations.
Whether to include the server tool call and its response in the Content of the model response. After setting to true, the client can observe the calling process of the server tool.
Response
200 - application/json
The cached content resource returned after successful creation. The response mainly contains cache identification, model, creation time, update time, actual expiration time and token usage.
The absolute time at which the cache actually expires. Regardless of whether expireTime or ttl is used in the request, the server will return this field in the response.
The total number of tokens currently occupied by cached content.
Required range: x >= 0
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Tikway","colors":{"primary":"#3d3b3a","light":"#ffffff","dark":"#000000"},"logo":{"light":"https://mintcdn.com/tikway/jbQHUstQv4m6VXpl/logo/light.png?fit=max\u0026auto=format\u0026n=jbQHUstQv4m6VXpl\u0026q=85\u0026s=2ffadc60838b347e4b303c5324329d71","dark":"https://mintcdn.com/tikway/jbQHUstQv4m6VXpl/logo/dark.png?fit=max\u0026auto=format\u0026n=jbQHUstQv4m6VXpl\u0026q=85\u0026s=70d626d8a1b2db6e9cfc2f93182f2acb"},"favicon":"https://mintcdn.com/tikway/jbQHUstQv4m6VXpl/favicon.png?fit=max\u0026auto=format\u0026n=jbQHUstQv4m6VXpl\u0026q=85\u0026s=e55efc78d7a9b37ff27557ac7556fe6e","api":{"params":{"expanded":"all"},"url":"full","mdx":{"auth":{"method":"bearer","name":"Authorization"},"server":"https://api.tikway.ai"}},"navbar":{"links":[],"primary":{"type":"button","label":"Dashboard","href":"https://app.mintlify.com"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"schema":false},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"https://tikway.ai"}]},"languages":[{"language":"zh","href":"zh/introduction"},{"language":"en","href":"en/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tikway","hasAudioNarration":false,"actualSubdomain":"tikway","customDomains":["docs.tikway.ai"],"gitSource":{"type":"github","owner":"tokgos","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6adc5bcc50fd02f25b78f1da","collectionId":"18ba77e3-afe9-43cc-8e60-e7b6de9c99b7","liveDeploymentHistoryId":"6adc5bcc50fd02f25b78f1da","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adc5bcc50fd02f25b78f1da","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"zh","tag":"API Reference","count":53},{"language":"en","tag":"API Reference","count":46},{"language":"zh","tag":"视频生成","count":15},{"language":"en","tag":"Video generation","count":14},{"language":"zh","tag":"图片生成","count":12},{"language":"en","tag":"Chat completions","count":11},{"language":"zh","tag":"对话补全","count":11},{"language":"en","tag":"Image generation","count":10},{"language":"en","tag":"Guides","count":8},{"language":"zh","tag":"指南","count":8},{"language":"en","tag":"Gemini protocol","count":6},{"language":"zh","tag":"Gemini 协议","count":6},{"language":"en","tag":"Speech synthesis","count":5},{"language":"zh","tag":"Midjourney","count":5},{"language":"zh","tag":"语音合成","count":5},{"language":"en","tag":"Developer guides","count":3},{"language":"en","tag":"Request protocols","count":3},{"language":"en","tag":"OpenAI protocol","count":3},{"language":"zh","tag":"开发指南","count":3},{"language":"zh","tag":"请求协议","count":3}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","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":"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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"privacy":{"consentBanner":{"enabled":false}},"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@media (min-width:1280px){html[data-current-path*=\"/api-reference/\"] div:has(>#sidebar):has(>#content-container){width:80%!important;max-width:none!important;margin-inline:auto!important;padding-inline:0!important;gap:2rem!important}html[data-current-path*=\"/api-reference/\"] #content-container{flex:1 1 0!important;width:auto!important;max-width:none!important;min-width:0!important}html[data-current-path*=\"/api-reference/\"] #content-container>div:has(>#content-area){gap:2rem!important}html[data-current-path*=\"/api-reference/\"] #content-area{flex:1 1 0!important;width:auto!important;max-width:none!important;min-width:0!important;margin-inline:0!important;padding-inline:0!important}html[data-current-path*=\"/api-reference/\"] #content-side-layout{flex:0 0 22rem!important;width:22rem!important;max-width:22rem!important}html[data-current-path*=\"/api-reference/\"] #content-side-layout>div{width:100%!important;min-width:0!important;max-width:100%!important}}@media (max-width:767px){html:is([data-current-path$=\"/api-reference/images/overview\"], [data-current-path$=\"/api-reference/videos/overview\"]) #content table{min-width:34rem}}"}],"page":{"pagePath":"en/api-reference/chat/gemini/create-cache","slug":"/en/api-reference/chat/gemini/create-cache","pageMetadata":{"title":"Create Cached Content","description":"","deprecated":false,"version":null,"sidebarTitle":"Create Cached Content","openapi":"/openapi/en/chat/gemini.json post /v1beta/cachedContents","href":"/en/api-reference/chat/gemini/create-cache","autogeneratedByOpenApi":true},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Cached Content","description":"","deprecated":false,"version":null,"sidebarTitle":"Create Cached Content","openapi":"/openapi/en/chat/gemini.json post /v1beta/cachedContents","href":"/en/api-reference/chat/gemini/create-cache","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create Cached Content","deprecated":false,"description":"","tags":["Chat completions/Gemini protocol"],"parameters":[],"requestBody":"d431cfd5-2124-4d04-b973-c9bf0e1e3e8b","responses":{"200":"e9a8e241-f3e6-4a8b-b5f3-9386769f341d"},"security":["f65e71b4-ab86-4133-9bc9-853c22af97fc"],"x-mint":{"href":"/en/api-reference/chat/gemini/create-cache","metadata":{"sidebarTitle":"Create Cached Content"}},"method":"post","type":"path","servers":["70b4b8d6-a443-40b9-b5a3-dd4a4cca7df8"],"path":"/v1beta/cachedContents","baseUrlOptions":["https://api.tikway.ai"],"title":"Create Cached Content","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","urlDisplay":"full"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Create a request body for cached content. The cached content is preprocessed and can be reused in subsequent build requests. The cache can only be used for the model specified when it was created.","required":["model"],"properties":{"model":{"type":"string","pattern":"^models/[^/]+$","description":"The name of the model resource used to create and use this cache. The cache can only be used for the models specified here, in the format models/{model}. This field is required and cannot be modified after creation.","examples":["models/gemini-1.5-flash-001","models/gemini-2.5-flash"],"isRequired":true,"uniqueKey":"model","typeLabel":"string"},"contents":{"type":"array","minItems":1,"description":"A list of content that needs to be cached. It can contain a single round of content, or it can contain multiple historical rounds of content in dialogue order. This field is for input only and cannot be modified after the cache is created.","items":{"type":"object","description":"A piece of dialogue consisting of a character and one or more content parts.","required":["parts"],"properties":{"parts":{"type":"array","minItems":1,"description":"A list of parts that make up the current content. Each Part can represent text, inline files, uploaded files, function calls, function responses, or code execution information.","items":{"type":"object","description":"an integral part of the content. text, inlineData, fileData, functionCall, functionResponse, executableCode, codeExecutionResult usually only one of them is set.","properties":{"text":{"type":"string","description":"Plain text content.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].text","typeLabel":"string"},"inlineData":{"type":"object","description":"To embed binary data directly in the request, the data needs to be Base64 encoded.","required":["mimeType","data"],"properties":{"mimeType":{"type":"string","description":"MIME type for inline data, such as text/plain, image/jpeg, application/pdf.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].inlineData.mimeType","typeLabel":"string"},"data":{"type":"string","format":"byte","description":"Base64 encoded file contents.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].inlineData.data","typeLabel":"string\u003cbyte>"},"displayName":{"type":"string","description":"The display name of the inline media.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].inlineData.displayName","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].inlineData","typeLabel":"object"},"fileData":{"type":"object","description":"File reference obtained after uploading via Gemini File API.","required":["mimeType","fileUri"],"properties":{"mimeType":{"type":"string","description":"The MIME type of the referenced file, such as text/plain, image/jpeg, application/pdf.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].fileData.mimeType","typeLabel":"string"},"fileUri":{"type":"string","description":"File URI returned by the File API.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].fileData.fileUri","typeLabel":"string"},"displayName":{"type":"string","description":"The display name of the file.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].fileData.displayName","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].fileData","typeLabel":"object"},"functionCall":{"type":"object","description":"Function call information generated by the model in historical conversations.","required":["name","args"],"properties":{"name":{"type":"string","description":"The name of the function to be called should be consistent with the function name declared in tools.functionDeclarations.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionCall.name","typeLabel":"string"},"args":{"type":"object","description":"The parameters used when calling the function, the structure is determined by the parameters JSON Schema of the corresponding function.","additionalProperties":true,"properties":{},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionCall.args","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionCall","typeLabel":"object"},"functionResponse":{"type":"object","description":"The result returned to the model after the client executes the function.","required":["name","response"],"properties":{"name":{"type":"string","description":"The name of the executed function should be consistent with the corresponding functionCall.name.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionResponse.name","typeLabel":"string"},"response":{"type":"object","description":"Function execution result. Can contain data, status, or error information returned by the function.","additionalProperties":true,"properties":{},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionResponse.response","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].functionResponse","typeLabel":"object"},"executableCode":{"type":"object","description":"Code generated by the model that can be run by the code execution environment.","required":["language","code"],"properties":{"language":{"type":"string","enum":["LANGUAGE_UNSPECIFIED","PYTHON"],"description":"The programming language used by the code. LANGUAGE_UNSPECIFIED means unspecified, PYTHON means Python.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].executableCode.language","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"The source code needs to be executed.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].executableCode.code","typeLabel":"string"},"id":{"type":"string","description":"Executable code block ID.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].executableCode.id","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].executableCode","typeLabel":"object"},"codeExecutionResult":{"type":"object","description":"The execution results returned by the code execution environment.","required":["outcome"],"properties":{"outcome":{"type":"string","enum":["OUTCOME_UNSPECIFIED","OUTCOME_OK","OUTCOME_FAILED","OUTCOME_DEADLINE_EXCEEDED"],"description":"Code execution status. OUTCOME_OK indicates success, OUTCOME_FAILED indicates failure, and OUTCOME_DEADLINE_EXCEEDED indicates execution timeout.","isRequired":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].codeExecutionResult.outcome","typeLabel":"enum\u003cstring>"},"output":{"type":"string","description":"Standard output, error messages, or other textual results produced by code execution.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].codeExecutionResult.output","typeLabel":"string"},"id":{"type":"string","description":"The corresponding code block ID.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].codeExecutionResult.id","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].codeExecutionResult","typeLabel":"object"},"thought":{"type":"boolean","description":"Indicates whether the current Part belongs to the thinking content of the model. Usually generated by the server, the original value should be maintained when returning historical content.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].thought","typeLabel":"boolean"},"thoughtSignature":{"type":"string","format":"byte","description":"A signature of what the model thinks about. The historical content of the model should be kept intact when returned and should not be modified or generated by the client.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].thoughtSignature","typeLabel":"string\u003cbyte>"},"partMetadata":{"type":"object","description":"Custom metadata associated with the content block.","additionalProperties":true,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].partMetadata","typeLabel":"object"},"mediaResolution":{"type":"object","description":"The resolution of this media content block.","properties":{"level":{"type":"string","enum":["MEDIA_RESOLUTION_UNSPECIFIED","MEDIA_RESOLUTION_LOW","MEDIA_RESOLUTION_MEDIUM","MEDIA_RESOLUTION_HIGH"],"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].mediaResolution.level","typeLabel":"enum\u003cstring>"}},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].mediaResolution","typeLabel":"object"},"mediaProcessing":{"type":"string","description":"How video content is processed.","uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].mediaProcessing","typeLabel":"string"},"audioTranscription":{"type":"object","description":"Audio transcription information.","properties":{},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].audioTranscription","typeLabel":"object"},"speechMetadata":{"type":"object","description":"Speech synthesis related metadata.","properties":{},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].speechMetadata","typeLabel":"object"},"toolCall":{"type":"object","description":"Server-side tool calls that need to be returned by the client.","properties":{},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].toolCall","typeLabel":"object"},"toolResponse":{"type":"object","description":"The execution result of the server tool call.","properties":{},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].toolResponse","typeLabel":"object"},"videoMetadata":{"type":"object","description":"Video content metadata.","properties":{},"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX].videoMetadata","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX].parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"contents.items.[INDEX].parts","typeLabel":"object[]"},"role":{"type":"string","enum":["user","model"],"description":"The role the content belongs to. user represents user content, and model represents historical content generated by the model.","uniqueKey":"contents.items.[INDEX].role","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"contents.items.[INDEX]","typeLabel":"object"},"uniqueKey":"contents","typeLabel":"object[]"},"tools":{"type":"array","description":"A list of tools that the model can use when subsequently generating content. This field is for input only and cannot be modified after the cache is created.","items":{"type":"object","description":"A tool statement. You can declare client functions, code execution tools, or other tools supported by the model.","properties":{"functionDeclarations":{"type":"array","minItems":1,"description":"A list of function declarations provided by the client for use by the model.","items":{"type":"object","description":"A function definition that can be called by the model.","required":["name","description"],"properties":{"name":{"type":"string","description":"function name. The name should be unique and comply with the naming rules supported by the server.","isRequired":true,"uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].name","typeLabel":"string"},"description":{"type":"string","description":"Function usage and calling scenario description, the model will determine whether to call the function based on this description.","isRequired":true,"uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].description","typeLabel":"string"},"parameters":{"type":"object","description":"JSON Schema of function parameters. Usually the type of the root node is object, and the parameters are declared through properties.","additionalProperties":true,"properties":{},"uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].parameters","typeLabel":"object"},"response":{"type":"object","description":"JSON Schema of the function return value, used to describe the structure of the function execution result.","additionalProperties":true,"properties":{},"uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].response","typeLabel":"object"},"behavior":{"type":"string","enum":["UNSPECIFIED","BLOCKING","NON_BLOCKING"],"description":"How the function call is executed.","uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].behavior","typeLabel":"enum\u003cstring>"},"parametersJsonSchema":{"description":"JSON Schema of function parameters; mutually exclusive with parameters .","uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].parametersJsonSchema","typeLabel":"any"},"responseJsonSchema":{"description":"JSON Schema of the function response; mutually exclusive with response .","uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX].responseJsonSchema","typeLabel":"any"}},"additionalProperties":false,"uniqueKey":"tools.items.[INDEX].functionDeclarations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools.items.[INDEX].functionDeclarations","typeLabel":"object[]"},"codeExecution":{"type":"object","description":"Enable model code execution capabilities. The current configuration object is usually empty.","additionalProperties":false,"properties":{},"uniqueKey":"tools.items.[INDEX].codeExecution","typeLabel":"object"},"googleSearchRetrieval":{"type":"object","description":"Google Search retrieves the configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].googleSearchRetrieval","typeLabel":"object"},"googleSearch":{"type":"object","description":"Google Search tool configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].googleSearch","typeLabel":"object"},"computerUse":{"type":"object","description":"Computer operating tool configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].computerUse","typeLabel":"object"},"urlContext":{"type":"object","description":"URL context tool configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].urlContext","typeLabel":"object"},"fileSearch":{"type":"object","description":"File search tool configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].fileSearch","typeLabel":"object"},"mcpServers":{"type":"array","description":"Connectable MCP server.","items":{"type":"object","properties":{},"uniqueKey":"tools.items.[INDEX].mcpServers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools.items.[INDEX].mcpServers","typeLabel":"object[]"},"googleMaps":{"type":"object","description":"Geolocation search tool configuration.","properties":{},"uniqueKey":"tools.items.[INDEX].googleMaps","typeLabel":"object"}},"additionalProperties":true,"uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"expireTime":{"type":"string","format":"date-time","description":"Absolute time of cache expiration, using RFC 3339 format. The server output will be normalized to UTC time. This field is mutually exclusive with ttl, at most one of them can be set.","examples":["2026-09-08T12:00:00Z","2026-09-08T12:00:00.123Z"],"uniqueKey":"expireTime","typeLabel":"string\u003cdate-time>"},"ttl":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,9})?s$","description":"The relative validity period of the cache, in seconds, supports up to 9 decimal places, and ends with s. This field is for input only and is mutually exclusive with expireTime.","examples":["300s","3600s","3.5s"],"uniqueKey":"ttl","typeLabel":"string"},"displayName":{"type":"string","maxLength":128,"description":"A human-readable name set by the user for the cached content, containing up to 128 Unicode characters. This field cannot be modified after the cache is created.","uniqueKey":"displayName","typeLabel":"string"},"systemInstruction":{"type":"object","description":"System commands set by the developer. Currently only plain text Parts are supported. This field is for input only and cannot be modified after the cache is created.","required":["parts"],"properties":{"parts":{"type":"array","minItems":1,"description":"List of text parts that make up a system command.","items":{"type":"object","description":"A text section in a system command.","required":["text"],"properties":{"text":{"type":"string","description":"System command text that defines a model's identity, behavior, task requirements, or output rules.","isRequired":true,"uniqueKey":"systemInstruction.parts.items.[INDEX].text","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"systemInstruction.parts.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"systemInstruction.parts","typeLabel":"object[]"},"role":{"type":"string","enum":["user","model"],"description":"The role of the system command content. This field can usually be omitted.","uniqueKey":"systemInstruction.role","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"systemInstruction","typeLabel":"object"},"toolConfig":{"type":"object","description":"Tool call configuration. This configuration is shared by all tools and is only used for input. The cache cannot be modified after it is created.","properties":{"functionCallingConfig":{"type":"object","description":"Function call behavior configuration.","properties":{"mode":{"type":"string","enum":["MODE_UNSPECIFIED","AUTO","ANY","NONE","VALIDATED"],"default":"AUTO","description":"Function calling pattern. MODE_UNSPECIFIED means unspecified and not recommended; AUTO means the model can return text or call a function at its discretion; ANY means the model must call a function; NONE means function calls are prohibited; VALIDATED means the model can return text or call a constraint-validated function.","uniqueKey":"toolConfig.functionCallingConfig.mode","typeLabel":"enum\u003cstring>"},"allowedFunctionNames":{"type":"array","minItems":1,"description":"A list of function names that the model is allowed to call. Should only be set when mode is ANY or VALIDATED, and the name must match the function name in functionDeclarations.","items":{"type":"string","description":"Function names that are allowed to be called.","uniqueKey":"toolConfig.functionCallingConfig.allowedFunctionNames.items.[INDEX]","typeLabel":"string"},"uniqueKey":"toolConfig.functionCallingConfig.allowedFunctionNames","typeLabel":"string[]"}},"additionalProperties":false,"uniqueKey":"toolConfig.functionCallingConfig","typeLabel":"object"},"retrievalConfig":{"type":"object","description":"Retrieves the context configuration used by the tool.","properties":{"latLng":{"type":"object","description":"The latitude and longitude of the user's location follows the WGS84 coordinate standard.","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","minimum":-90,"maximum":90,"description":"Latitude in degrees, ranging from -90 to 90.","isRequired":true,"uniqueKey":"toolConfig.retrievalConfig.latLng.latitude","typeLabel":"number"},"longitude":{"type":"number","minimum":-180,"maximum":180,"description":"Longitude in degrees, ranging from -180 to 180.","isRequired":true,"uniqueKey":"toolConfig.retrievalConfig.latLng.longitude","typeLabel":"number"}},"additionalProperties":false,"uniqueKey":"toolConfig.retrievalConfig.latLng","typeLabel":"object"},"languageCode":{"type":"string","description":"The language code used for user content should use BCP 47 language tags, such as zh-CN, en-US.","uniqueKey":"toolConfig.retrievalConfig.languageCode","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"toolConfig.retrievalConfig","typeLabel":"object"},"includeServerSideToolInvocations":{"type":"boolean","default":false,"description":"Whether to include the server tool call and its response in the Content of the model response. After setting to true, the client can observe the calling process of the server tool.","uniqueKey":"toolConfig.includeServerSideToolInvocations","typeLabel":"boolean"}},"additionalProperties":false,"uniqueKey":"toolConfig","typeLabel":"object"}},"not":{"required":["expireTime","ttl"]},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Default":{"title":"Default","value":{"model":"models/gemini-2.5-flash","displayName":"unicorn-story-context","systemInstruction":{"parts":[{"text":"You are a creative bedtime-story assistant. Keep stories gentle and suitable for children."}]},"contents":[{"role":"user","parts":[{"text":"Reference material: Unicorns are magical horses with a single horn. They live in enchanted forests and help kind-hearted people."}]}],"ttl":"3600s"}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"e9a8e241-f3e6-4a8b-b5f3-9386769f341d":{"description":"","content":{"application/json":{"schema":{"type":"object","description":"The cached content resource returned after successful creation. The response mainly contains cache identification, model, creation time, update time, actual expiration time and token usage.","required":["name","model","expireTime"],"properties":{"name":{"type":"string","pattern":"^cachedContents/[^/]+$","description":"The unique resource name of cached content, generated by the server, in the format cachedContents/{id}.","examples":["cachedContents/abc123def456"],"isRequired":true,"uniqueKey":"name","typeLabel":"string"},"model":{"type":"string","pattern":"^models/[^/]+$","description":"The name of the model resource bound to this cache. Caching can only be used with this model.","examples":["models/gemini-1.5-flash-001"],"isRequired":true,"uniqueKey":"model","typeLabel":"string"},"expireTime":{"type":"string","format":"date-time","description":"The absolute time at which the cache actually expires. Regardless of whether expireTime or ttl is used in the request, the server will return this field in the response.","examples":["2026-09-08T11:00:00Z"],"isRequired":true,"uniqueKey":"expireTime","typeLabel":"string\u003cdate-time>"},"displayName":{"type":"string","maxLength":128,"description":"The human-readable name set when creating the cache. This field may not be returned when not set.","uniqueKey":"displayName","typeLabel":"string"},"createTime":{"type":"string","format":"date-time","description":"The creation time of the cached resource, generated by the server, in RFC 3339 format and usually normalized to UTC time.","examples":["2026-09-08T10:00:00Z"],"uniqueKey":"createTime","typeLabel":"string\u003cdate-time>"},"updateTime":{"type":"string","format":"date-time","description":"The time when the cached resource was last updated, generated by the server, in RFC 3339 format and usually normalized to UTC time.","examples":["2026-09-08T10:00:00Z"],"uniqueKey":"updateTime","typeLabel":"string\u003cdate-time>"},"usageMetadata":{"type":"object","description":"Token usage information for cached content.","properties":{"totalTokenCount":{"type":"integer","minimum":0,"description":"The total number of tokens currently occupied by cached content.","uniqueKey":"usageMetadata.totalTokenCount","typeLabel":"integer"}},"additionalProperties":false,"uniqueKey":"usageMetadata","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"name":"cachedContents/abc123xyz","displayName":"starry-night-reference","model":"models/gemini-2.5-flash","createTime":"2026-09-10T08:30:00.123456Z","updateTime":"2026-09-10T08:30:00.123456Z","expireTime":"2026-09-10T09:30:00.123456Z","usageMetadata":{"totalTokenCount":1864}},"examples":{"Example":{"title":"Example","value":{"name":"cachedContents/abc123xyz","displayName":"starry-night-reference","model":"models/gemini-2.5-flash","createTime":"2026-09-10T08:30:00.123456Z","updateTime":"2026-09-10T08:30:00.123456Z","expireTime":"2026-09-10T09:30:00.123456Z","usageMetadata":{"totalTokenCount":1864}}}},"exampleType":"examples"}},"headers":{},"exampleType":"examples"}},"security":{"f65e71b4-ab86-4133-9bc9-853c22af97fc":{"geminiApiKey":{"type":"apiKey","in":"header","name":"x-goog-api-key","description":"Tikway API Key. Passed through the x-goog-api-key request header according to the Gemini native protocol.","scopes":[],"schemeName":"geminiApiKey"}}},"servers":{"70b4b8d6-a443-40b9-b5a3-dd4a4cca7df8":{"url":"https://api.tikway.ai","description":"production environment"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-goog-api-key","description":"Tikway API Key. Passed through the x-goog-api-key request header according to the Gemini native protocol.","scopes":[],"schemeName":"geminiApiKey"},"schema":{"title":"x-goog-api-key","type":"string","description":"Tikway API Key. Passed through the x-goog-api-key request header according to the Gemini native protocol.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"geminiApiKey","name":"x-goog-api-key"}],"title":"geminiApiKey"}]},"originalFileLocation":"openapi/en/chat/gemini.json"},"subdomain":"tikway","siteName":"Tikway","title":"Create Cached Content - Tikway","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"zh":{"href":"/zh/api-reference/chat/gemini/create-cache","matchLevel":1},"en":{"href":"/en/api-reference/chat/gemini/create-cache","matchLevel":0}}},"lastModified":"2026-10-24T07:18:55.765Z","originalFileLocation":"en/api-reference/chat/gemini/create-cache.mdx","locale":"en"},"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=\"application-name\" content=\"Tikway\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_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/tikway/BXjEGHgHOW9NRxi7/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Cached Content - Tikway\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tikway\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tikway.mintlify.app/_mintlify/api/og/v2?division=Gemini+protocol\u0026amp;title=Create+Cached+Content\u0026amp;theme=80cab077a26228715dec452f\u0026amp;signature=a4923aaacc038dde58de10de4c8192362d7ec1b81d35b8fae02f53ab7879998a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Cached Content - Tikway\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tikway.mintlify.app/_mintlify/api/og/v2?division=Gemini+protocol\u0026amp;title=Create+Cached+Content\u0026amp;theme=80cab077a26228715dec452f\u0026amp;signature=a4923aaacc038dde58de10de4c8192362d7ec1b81d35b8fae02f53ab7879998a\">\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/tikway/BXjEGHgHOW9NRxi7/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tikway\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3d3b3a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/chat/gemini/create-cache.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.tikway.ai/zh/api-reference/chat/gemini/create-cache\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.tikway.ai/zh/api-reference/chat/gemini/create-cache\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tikway.ai/#organization\",\"name\":\"Tikway\",\"url\":\"https://docs.tikway.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tikway/jbQHUstQv4m6VXpl/logo/light.png?fit=max\u0026auto=format\u0026n=jbQHUstQv4m6VXpl\u0026q=85\u0026s=2ffadc60838b347e4b303c5324329d71\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tikway.ai#website\",\"name\":\"Tikway\",\"url\":\"https://docs.tikway.ai\",\"publisher\":{\"@id\":\"https://docs.tikway.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache#webpage\",\"url\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\",\"name\":\"Create Cached Content\",\"dateModified\":\"2026-10-24T07:18:55.765Z\",\"isPartOf\":{\"@id\":\"https://docs.tikway.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Chat completions\",\"item\":\"https://docs.tikway.ai/en/api-reference/chat/openai/chat-completions\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemini protocol\",\"item\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/generate-content\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Cached Content\",\"item\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache#apireference\",\"headline\":\"Create Cached Content\",\"name\":\"Create Cached Content\",\"url\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tikway.ai/en/api-reference/chat/gemini/create-cache#webpage\"},\"dateModified\":\"2026-10-24T07:18:55.765Z\",\"publisher\":{\"@id\":\"https://docs.tikway.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tikway.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tikway\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Tikway","nav":{"global":{"anchors":[{"anchor":"Home","icon":"house","href":"https://tikway.ai"}]},"languages":[{"language":"zh","pages":[{"title":"zh","href":"/zh/api-reference/chat/gemini/create-cache"}]},{"language":"en","tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/en/introduction"}]},{"tab":"API Reference","groups":[{"group":"Chat completions","pages":[{"group":"OpenAI protocol","pages":[{"title":"Chat Completions","deprecated":false,"version":null,"sidebarTitle":"Chat Completions","openapi":"/openapi/en/chat/openai.json post /v1/chat/completions","href":"/en/api-reference/chat/openai/chat-completions"},{"title":"Responses","deprecated":false,"version":null,"sidebarTitle":"Responses","openapi":"/openapi/en/chat/openai.json post /v1/responses","href":"/en/api-reference/chat/openai/responses"},{"title":"Get Models","deprecated":false,"version":null,"sidebarTitle":"Get Models","openapi":"/openapi/en/chat/openai-models.json get /v1/models","href":"/en/api-reference/chat/openai/list-models"}]},{"group":"Anthropic protocol","pages":[{"title":"Messages","deprecated":false,"version":null,"sidebarTitle":"Messages","openapi":"/openapi/en/chat/anthropic.json post /v1/messages","href":"/en/api-reference/chat/anthropic/messages"},{"title":"Get Models","deprecated":false,"version":null,"sidebarTitle":"Get Models","openapi":"/openapi/en/chat/anthropic-models.json get /anthropic/v1/models","href":"/en/api-reference/chat/anthropic/list-models"}]},{"group":"Gemini protocol","pages":[{"title":"Generate Content","deprecated":false,"version":null,"sidebarTitle":"Generate Content","openapi":"/openapi/en/chat/gemini.json post /v1beta/models/{model}:generateContent","href":"/en/api-reference/chat/gemini/generate-content"},{"title":"Stream Generate Content","deprecated":false,"version":null,"sidebarTitle":"Stream Generate Content","openapi":"/openapi/en/chat/gemini.json post /v1beta/models/{model}:streamGenerateContent","href":"/en/api-reference/chat/gemini/stream-generate-content"},{"title":"Get Models","description":"Return the same full callable model catalog as GET /v1/models across providers and text, image, video, audio, embedding, and decision models. No implicit protocol filtering is applied. The native response envelope and pagination remain available; provider, mode, and type filters are explicit.\n\nEach model includes aliases, architecture, capabilities.endpoints, capabilities.parameters, and capabilities.reasoning_efforts, matching the OpenAI list. Merge common with the endpoint parameter array for its complete parameter set. Catalog inclusion does not imply support for generation through this protocol; use capabilities.endpoints.","deprecated":false,"version":null,"sidebarTitle":"Get Models","openapi":"/openapi/en/chat/gemini-models.json get /v1beta/models","href":"/en/api-reference/chat/gemini/list-models"},{"title":"Create Cached Content","deprecated":false,"version":null,"sidebarTitle":"Create Cached Content","openapi":"/openapi/en/chat/gemini.json post /v1beta/cachedContents","href":"/en/api-reference/chat/gemini/create-cache"},{"title":"Get Cached Content","description":"","deprecated":false,"version":null,"sidebarTitle":"Get Cached Content","openapi":"/openapi/en/chat/gemini.json get /v1beta/cachedContents/{id}","href":"/en/api-reference/chat/gemini/get-cache"},{"title":"Delete Cached Content","deprecated":false,"version":null,"sidebarTitle":"Delete Cached Content","openapi":"/openapi/en/chat/gemini.json delete /v1beta/cachedContents/{id}","href":"/en/api-reference/chat/gemini/delete-cache"}]}]},{"group":"Image generation","pages":[{"group":"GPT Image","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/gpt-image.json post /v1/images/generations","href":"/en/api-reference/images/gpt-image/generate"},{"title":"Image editing","deprecated":false,"version":null,"sidebarTitle":"Image editing","openapi":"/openapi/en/images/gpt-image.json post /v1/images/edits","href":"/en/api-reference/images/gpt-image/edit"}]},{"group":"Nano Banana","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/nano-banana.json post /v1/images/generations","href":"/en/api-reference/images/nano-banana/generate"},{"title":"Gemini protocol - image generation","deprecated":false,"version":null,"sidebarTitle":"Gemini protocol - image generation","openapi":"/openapi/en/images/nano-banana.json post /v1beta/models/{model}:generateContent","href":"/en/api-reference/images/nano-banana/generate-content"}]},{"group":"Qwen Image","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/qwen.json post /v1/images/generations","href":"/en/api-reference/images/qwen/generate"}]},{"group":"Seedream","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/seedream.json post /v1/images/generations","href":"/en/api-reference/images/seedream/generate"}]},{"group":"MAI Image","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/mai-image.json post /v1/images/generations","href":"/en/api-reference/images/mai-image/generate"}]},{"group":"Novel","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/novelai.json post /v1/images/generations","href":"/en/api-reference/images/novelai/generate"}]},{"group":"Flux","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/flux.json post /v1/images/generations","href":"/en/api-reference/images/flux/generate"}]},{"group":"Grok","pages":[{"title":"Image generation","deprecated":false,"version":null,"sidebarTitle":"Image generation","openapi":"/openapi/en/images/grok.json post /v1/images/generations","href":"/en/api-reference/images/grok/generate"}]}]},{"group":"Video generation","pages":[{"group":"Seedance","pages":[{"title":"Create a Seedance video","deprecated":false,"version":null,"sidebarTitle":"Create a Seedance video","openapi":"/openapi/en/videos/seedance.json post /v1/videos","href":"/en/api-reference/videos/seedance/create"},{"title":"Query Seedance video tasks","deprecated":false,"version":null,"sidebarTitle":"Query Seedance video tasks","openapi":"/openapi/en/videos/seedance.json get /v1/videos/{id}","href":"/en/api-reference/videos/seedance/get-task"}]},{"group":"Wan","pages":[{"title":"Create Wan video","deprecated":false,"version":null,"sidebarTitle":"Create Wan video","openapi":"/openapi/en/videos/wan.json post /v1/videos","href":"/en/api-reference/videos/wan/create"},{"title":"Query Wan video tasks","deprecated":false,"version":null,"sidebarTitle":"Query Wan video tasks","openapi":"/openapi/en/videos/wan.json get /v1/videos/{id}","href":"/en/api-reference/videos/wan/get-task"}]},{"group":"HappyHorse","pages":[{"title":"Create a HappyHorse video","deprecated":false,"version":null,"sidebarTitle":"Create a HappyHorse video","openapi":"/openapi/en/videos/happyhorse.json post /v1/videos","href":"/en/api-reference/videos/happyhorse/create"},{"title":"Query HappyHorse video tasks","deprecated":false,"version":null,"sidebarTitle":"Query HappyHorse video tasks","openapi":"/openapi/en/videos/happyhorse.json get /v1/videos/{id}","href":"/en/api-reference/videos/happyhorse/get-task"}]},{"group":"MiniMax","pages":[{"title":"Create MiniMax H3 video","deprecated":false,"version":null,"sidebarTitle":"Create MiniMax H3 video","openapi":"/openapi/en/videos/minimax.json post /v1/videos","href":"/en/api-reference/videos/minimax/create"},{"title":"Query MiniMax H3 video task","deprecated":false,"version":null,"sidebarTitle":"Query MiniMax H3 video task","openapi":"/openapi/en/videos/minimax.json get /v1/videos/{id}","href":"/en/api-reference/videos/minimax/get-task"}]},{"group":"Veo","pages":[{"title":"Create a Veo video","deprecated":false,"version":null,"sidebarTitle":"Create a Veo video","openapi":"/openapi/en/videos/veo.json post /v1/videos","href":"/en/api-reference/videos/veo/create"},{"title":"Query Veo video tasks","deprecated":false,"version":null,"sidebarTitle":"Query Veo video tasks","openapi":"/openapi/en/videos/veo.json get /v1/videos/{id}","href":"/en/api-reference/videos/veo/get-task"}]},{"group":"Grok","pages":[{"title":"Create a Grok Imagine Video video","deprecated":false,"version":null,"sidebarTitle":"Create a Grok Imagine Video video","openapi":"/openapi/en/videos/grok.json post /v1/videos","href":"/en/api-reference/videos/grok/create"},{"title":"Query Grok Imagine Video video tasks","deprecated":false,"version":null,"sidebarTitle":"Query Grok Imagine Video video tasks","openapi":"/openapi/en/videos/grok.json get /v1/videos/{id}","href":"/en/api-reference/videos/grok/get-task"}]},{"group":"Flux","pages":[{"title":"Create FLUX 3 Video videos","deprecated":false,"version":null,"sidebarTitle":"Create FLUX 3 Video videos","openapi":"/openapi/en/videos/flux.json post /v1/videos","href":"/en/api-reference/videos/flux/create"},{"title":"Query FLUX 3 Video video tasks","deprecated":false,"version":null,"sidebarTitle":"Query FLUX 3 Video video tasks","openapi":"/openapi/en/videos/flux.json get /v1/videos/{id}","href":"/en/api-reference/videos/flux/get-task"}]}]},{"group":"Embeddings","pages":[{"title":"GPT - vector","deprecated":false,"version":null,"sidebarTitle":"GPT - vector","openapi":"/openapi/en/embeddings/openapi.json post /v1/embeddings","href":"/en/api-reference/embeddings/openai/create"},{"title":"Gemini embedding","deprecated":false,"version":null,"sidebarTitle":"Gemini embedding","openapi":"/openapi/en/embeddings/openapi.json post /v1beta/models/google/{model}:embedContent","href":"/en/api-reference/embeddings/gemini/create"}]},{"group":"Transcriptions","pages":[{"title":"Speech transcription","deprecated":false,"version":null,"sidebarTitle":"Speech transcription","openapi":"/openapi/en/transcriptions/openapi.json post /v1/audio/transcriptions","href":"/en/api-reference/transcriptions/create"}]},{"group":"Speech synthesis","pages":[{"title":"Qwen voices","sidebarTitle":"Qwen voices","icon":"microphone","href":"/en/api-reference/speech/qwen/voices"},{"title":"Google TTS voices and usage","sidebarTitle":"Google voices","icon":"microphone","href":"/en/api-reference/speech/google/voices"},{"group":"Qwen3-TTS","pages":[{"title":"Qwen text to speech","deprecated":null,"version":null,"sidebarTitle":"Qwen text to speech","openapi":"/openapi/en/speech/qwen.json post /v1/audio/speech","href":"/en/api-reference/speech/qwen/create"}]},{"group":"Google TTS","pages":[{"title":"Google text to speech","deprecated":null,"version":null,"sidebarTitle":"Google text to speech","openapi":"/openapi/en/speech/google.json post /v1/audio/speech","href":"/en/api-reference/speech/google/create"}]},{"group":"Qwen Audio","pages":[{"title":"Qwen Audio text to speech","deprecated":null,"version":null,"sidebarTitle":"Qwen Audio text to speech","openapi":"/openapi/en/speech/qwen-audio.json post /v1/audio/speech","href":"/en/api-reference/speech/qwen-audio/create"}]}]},{"group":"Decisions","pages":[{"group":"OpenAI","pages":[{"title":"OpenAI decision evaluation","deprecated":null,"version":null,"sidebarTitle":"OpenAI decision evaluation","openapi":"/openapi/en/decisions/openai.json post /v1/decisions","href":"/en/api-reference/decisions/openai/create"}]},{"group":"Jev","pages":[{"title":"Jev decision evaluation","deprecated":null,"version":null,"sidebarTitle":"Jev decision evaluation","openapi":"/openapi/en/decisions/jev.json post /v1/decisions","href":"/en/api-reference/decisions/jev/create"}]}]},{"group":"Utilities","pages":[{"group":"Balance","pages":[{"title":"Get balance","deprecated":null,"version":null,"sidebarTitle":"Get balance","openapi":"/openapi/en/utilities/balance.json get /v1/user/balance","href":"/en/api-reference/utilities/balance"}]}]}]}]}]},"title":"Create Cached Content - Tikway","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}