Embed text
embedEmbed up to 32 strings (8000 characters each) with Workers AI. Default model @cf/baai/bge-m3. Also @cf/google/embeddinggemma-300m. Stops with budget_exhausted before it can use the neurons reserved for /v1/ask.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"texts": "<texts>"
},
"name": "embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional. @cf/baai/bge-m3 or @cf/google/embeddinggemma-300m. | |
| texts | Yes | 1 to 32 strings. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | ||
| model | No | ||
| embeddings | No | ||
| budget_remaining | No | ||
| estimated_neurons | No |