request_id field for tracing.
Error response format
All error responses have the following structure:Error message example
This error indicates that a parameter value exceeded the allowed maximum. Thetop_p parameter received a value of 100, whereas it should be between 0 and 1. The error type is invalid_request_error, with the code decimal_above_max_value.
Example error response
Unknown request parameters
On SambaCloud, the following endpoints accept only the request body parameters listed for them in the API reference. A request that includes any other top-level parameter fails with HTTP 400. The parameter is not ignored.POST /v1/chat/completionsPOST /v1/completionsPOST /v1/embeddingsPOST /v1/messagesPOST /v1/messages/count_tokensPOST /v1/audio/transcriptionsPOST /v1/audio/translations
POST /v1/responses ignores unknown parameters.
The error names one unknown parameter. If your request contains several, remove the named parameter and retry until the request succeeds.
Chat completions, completions, embeddings, and audio endpoints return the standard error format with the code unknown_parameter. The audio endpoints also list the supported parameters in error.message.
Chat completions, completions, embeddings, and audio
param or code field.
Messages and Count tokens
stream_options, also returns HTTP 400. That error has no code or param; error.message names the object that contains the field.
batch_size is not a request parameter. SambaCloud batches requests automatically, and a request that sets batch_size returns HTTP 400.
