DocsFeatures

OpenAPI specification

Model IDs and options in examples are illustrative. Select an available model from GET /v1/models and check its capabilities and current prices.

Temperature

Send a numeric temperature from 0 to 2 to control response variation. Sampling behavior depends on the selected model. Some models use prompt-based style controls, identified by the response header described below.

Prompt-based temperature

  • 0 to below 0.5: restrained, precise phrasing with less speculation.
  • 0.5 to 1: balanced phrasing with moderate variety.
  • Above 1 to 2: exploratory phrasing and creative alternatives where the task permits.
{
  "model": "deepseek-v4-flash",
  "messages": [
    {
      "role": "user",
      "content": "Suggest three names for a developer tool."
    }
  ],
  "temperature": 1.5
}

Identify the temperature mode

Responses using these style instructions include X-RelayOn-Temperature-Mode: prompt, including streaming responses and cache hits. Omitting temperature adds no style instruction and leaves the model’s default style.

Prompt-based temperature is not native sampling temperature. Values within a range use the same style instruction, and zero does not guarantee deterministic output. Requested JSON formatting takes precedence over response style.

Invalid values

Non-numeric values or values outside 0–2 return 400 invalid_temperature before inference. See Error handling for unsupported model options.