Skip to main content
The SambaNova API uses standard HTTP response status codes to indicate whether an API request was successful or failed. When a request fails, the API responds with a JSON object containing details about the error. The response follows the OpenAI error format with an additional 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. The top_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/completions
  • POST /v1/completions
  • POST /v1/embeddings
  • POST /v1/messages
  • POST /v1/messages/count_tokens
  • POST /v1/audio/transcriptions
  • POST /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
The Messages and Count tokens endpoints return the Anthropic error format, which has no param or code field.
Messages and Count tokens
An unknown field inside a nested object that accepts a fixed set of fields, such as 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.

Error categories

Use the following table to understand the various error categories.

Error code reference

Use the following table to understand and troubleshoot errors programmatically.