Upstage Solar LLM
AI-generatedSummary
Sends chat messages to Upstage Solar LLM models and returns the AI's response content.
Inputs
- model (required) — The Solar model to use (e.g., solar-mini, solar-pro, solar-pro2).
- messages.message (required) — Array of messages. Each message must have a 'role' (system, user, or assistant) and non-empty 'content'.
- tools — Array of tool/function specifications in JSON format. If invalid, an error is thrown. Leave empty to disable function calling.
- tool_choice — How the model should use tools: 'auto', 'required', or 'none'. Defaults to 'auto'.
- options.temperature — Controls randomness of output (0.0 to 2.0).
- options.max_tokens — Maximum number of tokens to generate (1 to 4000).
- options.top_p — Nucleus sampling parameter (0.0 to 1.0).
- options.stream — Whether to stream the response.
- options.reasoning_effort — Level of reasoning effort ('low' or 'high').
- options.frequency_penalty — Controls model tendency to repeat tokens (-2 to 2).
- options.presence_penalty — Adjusts tendency to include tokens already present (-2 to 2).
- options.response_format — Output format: 'text' (default), '_object', or '_schema'. '_schema' requires a valid schema and only works with solar-pro2.
- options._schema — JSON schema for structured outputs. Only used when response_format is '_schema'.
Output shape
A single record containing the AI's response content and metadata (usage, model, created).
The returned data includes the 'content' of the first choice, along with usage statistics and the full API response. If 'stream' is enabled, the full response object is returned. If the operation fails, an error field is included in the output when 'Continue on Error' is enabled.
Examples
Example 1: Basic chat completion
Select 'solar-mini', add a single 'user' message, and accept defaults.
Example 2: Structured output generation
Select 'solar-pro2', set response_format to '_schema', and provide a JSON schema definition.
Example 3: Function calling
Provide a JSON array of tools and set tool_choice to 'required'.