To use a language model hosted on OpenAI (or compatible), specify the openai path in the from field.
For a specific model, include it as the model ID in the from field (see example below). The default model is gpt-4o-mini.
fromThe from field takes the form openai:model_id where model_id is the model ID of the OpenAI model, valid model IDs are found in the {endpoint}/v1/models API response.
Example:
nameThe model name. This will be used as the model ID within Spice and Spice's endpoints (i.e. http://localhost:8090/v1/models). This can be set to the same value as the model ID in the from field.
params| Param | Description | Default |
|---|---|---|
endpoint | The OpenAI API base endpoint. Can be overridden to use a compatible provider (i.e. NVIDIA NIM). | https://api.openai.com/v1 |
tools | Which tools (opens in a new tab) should be made available to the model. Set to auto to use all available tools. | - |
system_prompt | An additional system prompt used for all chat completions to this model. | - |
openai_api_key | The OpenAI API key. | - |
openai_org_id | The OpenAI organization ID. | - |
openai_project_id | The OpenAI project ID. | - |
openai_temperature | Set the default temperature to use on chat completions. | - |
openai_response_format | An object specifying the format that the model must output, see structured outputs (opens in a new tab). | - |
openai_reasoning_effort | For reasoning models, like o1, this parameter specifies the reasoning effort used for the model. | - |
openai_usage_tier | The OpenAI usage tier (opens in a new tab) for the account. This parameter sets the maximum number of concurrent requests based on OpenAI's published limits per tier. Valid values are free, tier1, tier2, tier3, tier4, or tier5. | tier1 |
responses_api | enabled or disabled. Whether to enable invoking this model from the /v1/responses HTTP endpoint using OpenAI's Responses API (opens in a new tab). When using OpenAI-compatible providers, ensure the provider supports OpenAI's Responses API. | disabled |
openai_responses_tools | Comma-separated list of OpenAI-hosted tools exposed via the Responses API for this model. These hosted tools are not available from the /v1/chat/completions HTTP endpoint. Supported tools: code_interpreter, web_search, web_search_preview. | - |
web_search selects OpenAI's current web search tool. web_search_preview selects the legacy tool of the same name, retained for older models that do not support the current one — prefer web_search unless the model rejects it.
See Large Language Models (opens in a new tab) for additional configuration options.
Spice supports several OpenAI compatible providers. Specify the appropriate endpoint in the params section.
Follow Azure AI Models (opens in a new tab) instructions.
Groq provides OpenAI compatible endpoints. Use the following configuration:
NVIDIA NIM models are OpenAI compatible endpoints. Use the following configuration:
View the Spice cookbook for an example of setting up NVIDIA NIM with Spice here (opens in a new tab).
Parasail also offers OpenAI compatible endpoints. Use the following configuration:
Refer to the respective provider documentation for more details on available models and configurations.