FutureWay AI

Inference API

Create a chat completion

Generates the model's reply to a sequence of messages — with streaming, tool calls and structured output as with OpenAI.

POSThttps://api.futureway.ai/v1/chat/completions

Authentication

Header
Authorization: Bearer $FUTUREWAY_API_KEY
Scope
inferenceInference API: chat completions, embeddings, model list.
Key kinds
personal · service
Format
OpenAI-compatible
Streaming
yes — stream: true returns server-sent events

Details on keys and scopes under Authentication.

Parameters

NameTypeRequiredDescription
modelstringyesModel alias, e.g. futureway-smart.
messagesarrayyesThe conversation in order; at least one message.
messages[].rolestringsystem | user | assistant | toolyesWho is speaking.
messages[].contentstringyesText of the message; images as content parts as with OpenAI, if the model supports images.
streambooleannoAnswer as server-sent events as tokens are generated.
temperaturenumbernoRandomness 0–2; the model's default when omitted.
max_tokensintegernoUpper bound on the answer length.
toolsarraynoTool definitions in the OpenAI function format.
tool_choicestringnoauto, none or a specific tool.
response_formatobjectnoStructured output, e.g. { "type": "json_object" }.

Example request

curl https://api.futureway.ai/v1/chat/completions \
  -H "Authorization: Bearer $FUTUREWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "futureway-smart",
  "messages": [
    {
      "role": "user",
      "content": "Was ist die Hauptstadt von Frankreich?"
    }
  ]
}'

Response

200

{
  "id": "chatcmpl-8f3c…",
  "object": "chat.completion",
  "created": 1757750400,
  "model": "futureway-smart",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Die Hauptstadt von Frankreich ist Paris."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 14,
    "completion_tokens": 9,
    "total_tokens": 23
  }
}

Errors

StatusCodeDescription
401unauthorizedNo, invalid or revoked API key.
400invalid_request_errorInvalid request (missing required fields, unknown parameter, body too large).
404model_not_foundUnknown model id, or a model this key may not address.
429rate_limit_errorToo many requests in the window; retry-after names the wait.
429budget_exceededThe organisation's usage quota is exhausted — no retry helps until the window resets.
503service_unavailableThe model is temporarily unreachable — retry with backoff.

Formats and handling under Errors.

This website uses no cookies and builds no user profiles — which is why there is no cookie banner. Our anonymous reach measurement runs on our own servers in Germany, with no analytics service involved.

Learn more
POST /v1/chat/completions — Create a chat completion | FutureWay AI