Skip to content
ShopAssist Docs
AI

Bring your own key (BYOK)

Connect your own AI provider key, what the connection test checks, daily health checks, fallback, cost estimates and the residency attestation.

With your own key, the assistant runs on your account at your AI provider. Your provider bills you for usage, and it is your processor, not ShopAssist's sub-processor.

Providers

Connect a key

  1. In AI → Model, choose Use your own AI key, the provider and the model.
  2. Read the data-location note for the provider and tick the attestation (below).
  3. Paste the key and save. The key is encrypted at rest and never shown again; only its last four characters are displayed.
  4. Test connection runs automatically. Until it passes, the assistant is unavailable on your storefront and the widget offers your contact options instead.

What the connection test checks

Checks run by Test connection
CheckRequiredWhat it testsOn failure
authYesThe key is accepted (lists models or sends a tiny request)auth_failed, insufficient_quota, gemini_free_tier, endpoint_blocked, provider_unavailable, model_not_found
toolsYesThe model calls a tool with valid arguments and continues after the resulttools_unsupported: the model can't run the shopping tools
ttftNo (degraded)The first answer event arrives within 8 secondsttft_slow: works, but shoppers wait
parallel_toolsNoTwo tools are called in one stepparallel_tools_unsupported: slightly slower answers
visionNoThe model names the colour of a test imagevision_unsupported: visual search is off
contextSelf-hosted onlyA fact at the start of an 8,000-token prompt is recalledcontext_too_small: the endpoint truncates prompts

The test takes up to 30 seconds and can be run 10 times per hour. Probe requests are tiny and never counted as conversations.

Daily health checks

Every day ShopAssist checks that the key is still accepted, and once a week it runs the full test. If the key stops working or slows down, owners and admins get an email (at most once a day) and the dashboard shows the reason. After fixing it, run Test connection again.

Fallback

Add a second key in AI → Fallback to switch automatically when the primary provider fails. Without a fallback, provider outages are not covered by the SLA.

Cost

Your provider charges per token. Typical costs per 1,000 conversations:

What your own AI key costs

Estimate based on list prices on 2026-09-28; your provider bills you directly.

Estimated provider cost per 1,000 conversations
ProviderModelUSD per 1,000 conversations≈ EUR per 1,000 conversations
Azure OpenAIGPT-6 Luna$3.61€3.10
MistralMistral Small 4$4.71€4.05
OpenAIGPT-5.6 Luna$7.62€6.55
Google GeminiGemini 3.1 Flash-Lite$8.85€7.61
OpenAIGPT-5 mini$9.85€8.47
Google GeminiGemini 3.5 Flash-Lite$12.02€10.34
MistralMistral Large 3$14.70€12.64
OpenAIGPT-5.4 mini$26.55€22.83
AnthropicClaude Haiku 4.5$36.10€31.05
AnthropicClaude Sonnet 5$72.20€62.09

Attestation

Before you save a key, you confirm:

"I confirm that my business has its own agreement with {provider}, including a data processing agreement and, where needed, a valid transfer mechanism for any processing outside the EEA. I instruct ShopAssist to send shopper conversations and the store data needed to answer them to this provider. I understand that {provider} is my processor, not ShopAssist's sub-processor."

The confirmation is recorded with the store, the provider and the attestation version. Saving without it fails with residency_ack_required.

Errors

CodeMeaningFix
auth_failedThe provider rejected the keyCreate a new key; check the project or organization
insufficient_quotaNo credit left on the provider accountTop up or raise the spending limit
rate_limitedThe provider is rate-limitingRaise your tier at the provider, or add a fallback
model_not_foundThe model or deployment doesn't exist or was retiredChoose a current model
tools_unsupportedThe model can't call toolsChoose a model with tool calling
context_too_smallThe endpoint truncates promptsRaise the context window (self-hosted)
endpoint_blockedThe URL isn't public HTTPSExpose it over HTTPS with authentication
invalid_key_format, key_provider_mismatchThe key doesn't look like a key for this providerCheck you pasted the right key

More: AI provider errors.

Last updated on

On this page