Authorization
Required
Bearer <token>In: header
application/jsonRequired
model
Required
stringThe model alias or snapshot to use for the chat completion. We recommend using a stable alias unless you need to pin a specific model version.
Value in: "solar-pro4" | "solar-pro4-260806" | "solar-mini4" | "solar-mini4-260922" | "syn-pro" | "syn-pro-251021"
messages
Required
array<object>A list of messages comprising the conversation so far.
reasoning_effortstringnull
An optional parameter that controls how much reasoning a model does before it answers. Support, accepted values, and behavior when omitted depend on the selected model. The request schema applies model-specific constraints for current Solar model families. Learn more in the Reasoning guide.
max_tokensinteger
An optional parameter that limits the maximum number of tokens to generate. If max_tokens is set, sum of input tokens and max_tokens should be lower than or equal to context length of model.
Default: "inf"
streamboolean
An optional parameter that specifies whether a response should be sent as a stream. If set to true, partial message deltas will be sent. Tokens will be sent as data-only server-sent events.
Default: falseValue in: true | false
stream_optionsobject
An optional object with settings that apply when stream is true.
temperaturenumber
An optional parameter to set the sampling temperature. The value should lie between 0 and 2. Higher values like 0.8 result in a more random output, whereas lower values such as 0.2 enhance focus and determinism in the output.
Defaults to 1.0 for solar-pro4.
Default: 1Minimum: 0Maximum: 2Format: "float"
top_pnumber
An optional parameter to trigger nucleus sampling. The tokens with top_p probability mass will be considered, which means, setting this value to 0.1 will consider tokens comprising the top 10% probability.
Default: 1Minimum: 0Maximum: 1Format: "float"
frequency_penaltynumber
An optional parameter that controls the model’s tendency to repeat tokens. The value ranges from -2.0 to 2.0.
- Positive values (e.g., 1.5) increase the penalty for repeating tokens, reducing redundancy and encouraging diversity in the output.
- Negative values (e.g., -1.0) decrease the penalty, allowing the model to repeat words or phrases more freely, which can be useful for stylistic emphasis or specific formatting needs.
- A value of 0 applies no penalty, letting the model generate text based purely on its learned patterns.
This parameter is especially effective in balancing creativity and coherence in longer outputs.
Default: 1.1Minimum: -2Maximum: 2Format: "float"
presence_penaltynumber
An optional parameter that adjusts the model’s tendency to include tokens already present in the input or generated text. The value ranges from -2.0 to 2.0.
- Positive values (e.g., 1.5) penalize the inclusion of any tokens that have already appeared, reducing redundancy and steering the output toward new ideas or topics.
- Negative values (e.g., -1.0) lower the penalty, encouraging the model to revisit or emphasize existing tokens, which can help maintain consistency or focus on specific themes.
- A value of 0 applies no penalty, letting the model generate text without bias toward or against repeated tokens.
This parameter is useful for controlling coherence (e.g., avoiding topic drift with positive values) or reinforcing key concepts (e.g., with negative values in summaries or creative writing). Unlike frequency_penalty, it focuses on the presence of tokens rather than their repetition frequency.
Default: 0Minimum: -2Maximum: 2Format: "float"
toolsarraynull
A list of tools the model may call. Currently, only functions are supported as a tool. Learn more in the Tool calling guide..
Use this to provide a list of functions the model may generate JSON inputs for.
tool_choicestring | object
Controls which (if any) tool is called by the model.
none means the model will not call any tool and instead generates a message.
auto means the model can pick between generating a message or calling one or more tools.
required means the model must call one or more tools.
- Specifying a particular tool via
{"type": "function", "function": {"name": "my_function"}} forces the model to call that tool.
none is the default when no tools are present. auto is the default if tools are present.
parallel_tool_callsboolean
Whether to allow parallel function calling during tool use. When enabled, the model may generate multiple tool calls in a single response, allowing independent calls to run concurrently. This setting does not guarantee more than one tool call; process whatever tool_calls the model returns.
Default: true
response_formatJSON mode | Structured outputs
An object specifying the format that the model must generate. There are two modes.
- JSON mode (
{"type": "json_object"}) returns a JSON object without a schema. The conversation must include the word JSON somewhere, otherwise the request is rejected. This mode guarantees that the output parses as valid JSON, but not that it follows any particular shape, so the field names, types, and nesting can differ between calls.
- Structured outputs (
{"type": "json_schema", "json_schema": { ... }}) constrains the output to a JSON Schema that you supply, so every response comes back with the same fields, types, and enum values.
The current Solar aliases support json_schema. Learn more in the Structured outputs guide.
json_schema is required when type is json_schema, and is ignored otherwise. It must contain a name, strict set to true, and a schema. Following the OpenAI-compatible contract, every object in the schema must set additionalProperties to false and list all of its properties in required; make a value optional by adding null to its type instead of dropping it from required.
prompt_cache_keystring
An optional parameter that specifies a unique key for identifying and caching the prompt. Use a distinct key for each conversational context to improve cache utilization.
Default: null