Docs menuinvideo Platform docsQuickstartFor AI agentsAPI referenceAuthenticationRequestsFilesErrorsLimitsBilling and balanceCatalogueProvider keys (BYOK)Formats and model IDsChat completionsOpenAI ResponsesAnthropic MessagesGeminiStreaming chat answersTools (function calling)Structured output (JSON)VideoAudioUse your own SDKOpenAI mediaElevenLabsReplicatefalGemini mediaxAIRunwayLumaDeepgram and CartesiaMakers' own APIsVideo provider formatsImage provider formatsAudio provider formatsLLM provider formatsGenerate and edit imagesTest your integrationWorkspaces and membersSecurityService accountsModels
View as markdown

Provider keys (BYOK)

Run models on your own provider accounts, what invideo charges, what happens when your key fails, and how a request asks for it.

A workspace can add its own API keys for the providers behind our models. A request for a model of such a provider then runs on your account at that provider. Your provider bills you for the run, and invideo charges only a small fee instead of the model's price.

Provider keys (BYOK) is available per workspace. Contact invideo to request access.

Add a key

Owners and admins can add keys under Provider keys (BYOK). invideo encrypts the key and the console shows its last four characters.

Before saving a key, the console sends one small request to the provider. If the test passes, the key is Active. If it fails, the console shows why and what to do next. Choose Save anyway to keep the key marked Not accepted until it passes a test. To retry, choose Test key in the key’s menu.

Turn a key off to go back to invideo's key and the normal prices; delete it to erase it. A change reaches every request within about a minute.

ProviderThe key
fal, OpenAI, Anthropic, xAI, ElevenLabs, MiniMax, Kling, BytePlus, Ideogram, Alibaba Cloud, PixVerse, Luma, Runway, Black Forest Labs, Cartesia, OpenRouterAn API key
Google VertexA service account key (JSON) for a project where Vertex AI is on. Gemini chat and the Google media models run in that project.
Amazon BedrockNo key: an IAM role in your AWS account that trusts invideo for the external id the console shows, and its ARN

GET /v1/models names the provider a model needs (byok_provider) and whether your workspace has a working key for it (byok_active). Your provider's own terms, limits and data retention apply to runs on your key.

What invideo charges

A request on your key costs invideo's fee, never the list price. Unless invideo set another fee for your workspace, it is 5% of the model's list price, worked out exactly like the price you would have paid. A request that fails is free. Your Spend page and the request's cost_usd show the fee only.

Which requests use your key

By default every request for a model of a provider you have a working key for. In the console you can change this to only requests that ask for it, for the whole workspace, one provider or one model. One request can always decide for itself:

  • the JSON body of a media request takes "byok": true (or false);
  • every call, chat included, takes the header X-Invideo-Byok: 1 (or 0).

A request that asks for your key and cannot have it fails with 422 byok_no_key. The answer to a media request has the header X-Invideo-Byok: true when it runs on your key, and GET /v1/request/{id} has "byok": true.

When your key fails

These BYOK errors identify a problem with your key or provider account.

CodeMeaning
byok_credential_rejectedThe provider did not accept your key. Three refusals in a row turn the key to Not accepted.
byok_provider_forbiddenYour provider account knows the key but refused this request, usually because it has no access to the model. The key is not turned off for this.
byok_provider_quotaYour provider account has no credit or quota left.
byok_provider_rate_limitedYour provider account hit its rate limit. Retry in a moment.
byok_credential_unavailableThe key could not be loaded. Check it in the console.

Set the key failure policy under If your key fails in the console. You can set it for the workspace, a provider, a model, or a single request with X-Invideo-Byok-Fallback: invideo.

Provider keys (BYOK) - Docs | invideo Platform