Chat Completions
POST /waves/v1/chat/completions - OpenAI-compatible chat completion API. Full request and response reference.
POST https://api.smallest.ai/waves/v1/chat/completions
OpenAI-compatible chat completion endpoint. Most OpenAI Chat Completions request fields are accepted and passed through to Electron verbatim. The response shape matches OpenAI’s chat.completion object.
Request
Authentication
Required fields
Common optional fields
Unrecognized parameters not in the supported set are accepted by the schema but may be ignored by the model. See Supported Parameters for the full passthrough table.
Explicitly rejected fields
Sending either returns HTTP 400 with invalid_request_error.
Response
Non-streaming (default)
Standard OpenAI chat.completion object:
usage block
finish_reason
Streaming
When stream: true, the response is text/event-stream SSE. See Streaming for chunk format and example consumer code.
Errors
Errors use the OpenAI-style envelope. Validation failures also include a details array with per-field reasons:
Authentication is checked before the request reaches Electron, so a missing or invalid API key returns 401 with a short body such as {"error": "unauthorized"}, not the envelope above. An access token (wat_…) isn’t accepted on this endpoint and returns 403 with {"error": "forbidden"}; use an API key. For these, check the status code, not the body.