Inference API
Create embeddings
Computes vector embeddings for text, e.g. for your own search or RAG.
POSThttps://api.futureway.ai/v1/embeddings
Authentication
- Header
Authorization: Bearer $FUTUREWAY_API_KEY- Scope
- inferenceInference API: chat completions, embeddings, model list.
- Key kinds
- personal · service
- Format
- OpenAI-compatible
Details on keys and scopes under Authentication.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Embedding alias, e.g. futureway-embed. |
| input | string | yes | The text to embed. |
Example request
curl https://api.futureway.ai/v1/embeddings \
-H "Authorization: Bearer $FUTUREWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "futureway-embed",
"input": "Dein Text hier."
}'Response
200
{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0123,
-0.0456,
"…"
]
}
],
"model": "futureway-embed",
"usage": {
"prompt_tokens": 4,
"total_tokens": 4
}
}Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | No, invalid or revoked API key. |
| 400 | invalid_request_error | Invalid request (missing required fields, unknown parameter, body too large). |
| 404 | model_not_found | Unknown model id, or a model this key may not address. |
| 429 | rate_limit_error | Too many requests in the window; retry-after names the wait. |
| 429 | budget_exceeded | The organisation's usage quota is exhausted — no retry helps until the window resets. |
| 503 | service_unavailable | The model is temporarily unreachable — retry with backoff. |
Formats and handling under Errors.