Wetel
Go back

Bring your own search: using Wetel's embeddings API with your own data

A photo lab develops your film and hands back the prints. It does not decide which album they go in, it does not label them, and it does not find “the one from the beach” for you next year. You do that, in your own albums, your own way. You went to the lab for one thing it does well.

Wetel’s embeddings API is that kind of service. You send text; you get back a list of numbers per text (a vector) that places similar meanings close together. What you do with the vectors, where you keep them and how you search them is yours.

This post is for the developer deciding whether that is the right shape for their product, using one documented case: a support platform that wanted semantic search over its own help articles.

The short answer

Use the embed query when your product already owns its content and its search, and you only want the vectors. Use a Wetel knowledge base when the answer is given inside a Wetel conversation and you want Wetel to store, chunk and retrieve for you.

embed is a single query: no agent, no session, no workflow, no knowledge base. Your backend calls it with an API key and gets one vector back per text. Storage, indexing and similarity search happen on your side.

The docs describe a customer-support platform with its own feature plans: semantic search over help articles, and matching new tickets to past resolutions. It needed text embeddings but did not want to build and host an embedding model, or adopt an agent and conversation layer it had no use for.

So its backend calls embed wherever it needs a vector, and does its own vector storage and similarity search on its own infrastructure. No persona, no workflow, no conversation: one query on Wetel’s standard API-key authentication.

flowchart LR
A["Your backend: article passages"] -- "embed(texts)" --> W["Wetel embed"]
W -- "one vector per text, same order" --> A
A -- "vector + passage id + text" --> I["Your vector index"]
Q["A user's question"] --> A
A -- "similarity search" --> I
I -- "closest passages" --> A

Wetel’s part is the two arrows to and from the embed box. The index, the search and the decision about what to show are your code.

What embed returns

For each string you send, one vector of 768 numbers, in the same order as your input, plus a usage estimate for the whole call. The documented shape:

type EmbedUsageDto {
inputTokens: Int!
outputTokens: Int!
costUsd: Float!
}
type EmbedResultDto {
vectors: [[Float!]!]!
usage: EmbedUsageDto!
}
extend type Query {
embed(texts: [String!]!): EmbedResultDto!
}

The reference says the vectors array is always fully populated, with no null entries, and that the model and dimensions are the same as your workspace’s knowledge base uses. That last point matters if you ever run both: vectors from embed and from a Wetel knowledge base are comparable without re-embedding.

The documented limits

Up to 100 texts per call, and 10 calls per minute per client IP address.

Authentication: an API key, from your backend only

embed accepts an API key in the X-Api-Key header, and nothing else. A dashboard login token is refused. Every call also needs the x-huat-platform: customer header, like every other Wetel API call.

Keep the key in your backend, never in a browser or a mobile app. A key is created by someone on your team who is signed in to the dashboard, and it is shown once; how API keys are scoped explains what else the same key can do. If you hit the limits above, the documented errors name the cause: a missing key, more than 100 texts, a missing platform header, or the rate limit.

Cost and usage: reported and estimated

Each call returns an estimate of tokens and cost, and your workspace’s monthly usage report includes embedding calls. The details matter:

The docs describe no cache for embed. So the habit that saves the most is yours: embed each passage once, store the vector next to the passage text and its id, and re-embed only when the text changes.

When a knowledge base is the better fit

If the reader of the answer is talking to an AI employee in Wetel, start with a knowledge base, not raw vectors. A knowledge base does the parts this post leaves to you:

One documented trade-off: if retrieval fails at runtime, the step carries on without the reference material rather than failing the turn, and the run record shows whether retrieval ran. Answering from your own policies, with sources walks through that path.

A rough rule: a knowledge base when Wetel’s AI employee is the one answering; embed when your own product is the one searching.

What Wetel does not do for you with embed

With embed, Wetel turns text into vectors and nothing else. You build and own:

What we do not claim

We publish no figure for search quality. Whether the closest vectors are the passages your users wanted depends on your content, how you split it and how you rank results. Test with real questions from your own users, keep the misses, and adjust your splitting before anything else.

The embeddings page also does not say how long the texts you send are kept. If that matters for the data you plan to send, ask before you send it.

The lab develops the film well. The album is still yours.

To start, read the Embeddings API guide and make your first call from your backend.


Share this post:

Next Post
Answering from your own policies, with sources you can check
Previous Post
Building your own admin panel on Wetel's admin API