Prerequisites
- An API token. See Token Management.
- Your Zylon hostname (replace
{BASE_URL}in the examples).
Before you start
- Order matters:
data[index]aligns with your input order. - Store the vectors in your database or vector index to power search and similarity.
- Use consistent preprocessing (same casing and formatting) for better similarity results.
Create embeddings
Generate embeddings withPOST /embeddings. The input can be a single string or an array.
input shape | When to use |
|---|---|
| Single string | One text at a time. |
| Array of strings | Batch inputs and keep output order. |
- Single input
- Batch input
Example response
Example response
Errors and edge cases
- 401/403: token missing or invalid.
- 413: input too large.
- 400: invalid JSON or input type.