Skip to main content
By default, search in a world is keyword search. With bring-your-own-key (BYOK) embeddings, Worlds also builds vector embeddings of a world’s text with your embedding provider account, and search combines both rankings. Paraphrases and questions that share no words with the stored text can then find the right entity. See Search for how the rankings merge. You pay the provider directly for the embedding calls. Wazoo stores your key encrypted, never returns it, and uses it only to embed the text of your own worlds.

Providers and models

A namespace holds one key per provider. The model you choose for a world decides which provider’s key is used. All vectors are 1536 dimensions wide, so a model is only available if it can produce that width. Larger models are sent a request for 1536 dimensions. Other models are not accepted.

Prerequisites

  • A Wazoo platform token (wzp_) with the users.write scope to store and revoke keys. A token with users.read can list them. See Tokens for more information.
  • A world and a world token (wzw_) for it. Choosing a model for the world and reindexing it (rebuilding its search index with that model) require a token with the data:write scope. Searching requires data:read.
  • An account and API key with an embedding provider. Set a monthly spend limit on the key if you want to cap what the provider can bill.
  • The base URL of your Worlds deployment. The examples use https://data.wazoo.dev; if you self-host Worlds, use your own base URL. Replace <world_id> in each example with your world’s id.
1

Store your provider key

Send the key to the Platform API with your platform token.
Store an OpenAI key
For OpenRouter, use openrouter in the path and your OpenRouter key.The response shows metadata only:
Response
The key must consist of 16 to 512 printable characters without whitespace.
2

Choose a model for a world

Set the model on the world with a world token that has data:write. Choosing a model requires an active key for that model’s provider.
Choose a model
The world’s embeddingStatus becomes stale because the world now has a model but no vectors built with it yet. Search stays keyword-only until you reindex.
3

Reindex the world

Reindexing rebuilds the world’s search index. It embeds the world’s text with your key and spends your provider budget. Your data is not changed, and reindexing does not run automatically.
Reindex
The response status is one of:Vector indexing is asynchronous. When reindex reports completed, your vectors are written, but the vector index can take a minute or more to start serving them. Keyword search reflects your data immediately, so results still return in the meantime.
4

Check the world's status

Read the world
Read embeddingStatus in the response:A world becomes stale when you change its model, when you revoke the key its model uses, or when removing vectors after a delete fails. While a world is stale, search ignores its vectors and runs keyword-only until you reindex.
5

Search

Search
The response mode says which search ran: hybrid (keyword and vectors), semantic (vectors only), keyword (full text only), or fallback (a simple text match, used when the search engine is unavailable). A query that does not share any words with the stored text, such as a paraphrase, returns results only in hybrid or semantic mode. If mode is still keyword right after a reindex, wait a minute and search again.

List, rotate, and revoke keys

List the keys a namespace holds. Revoked keys stay in the list so their status stays readable:
List providers
To rotate a key, send the same PUT with the new key. To revoke a key, delete it:
Revoke a key
Revoking erases the stored key. Every world that uses that provider’s models becomes stale and falls back to keyword search. Worlds on another provider’s models are not affected. After you store a new key, reindex each world before hybrid search returns. Vectors built before a revoke are never reused.

Cost and limits

  • Reindexing and importing text call your provider and bill your account. A retry after a transient provider error is billed again.
  • Each namespace has a daily limit on embedding writes. When it is exhausted, reindex returns 429 with the code EMBEDDING_BUDGET_EXCEEDED and nothing is embedded or billed.
  • Searching embeds only the query text. Each namespace also has a daily limit on embedded searches. Past it, or when the provider is slow or unavailable, search falls back to keyword results.

Troubleshooting

Next steps