curl --request POST \
--url http://localhost:8080/api/v2/config/resources/language_models \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"provider": "openai-responses",
"config": {}
}
'{
"success": true,
"status": "ready",
"error": "<string>"
}Add a new language model configuration at runtime.
Creates a new language model with the specified configuration and attempts to initialize it immediately. This allows adding models without restarting the server. The configuration is persisted to the configuration file.
Security Warning: API keys and credentials are stored in plain text in
the configuration file. Only use this API in protected environments. To
avoid storing secrets in plain text, use environment variable references
(e.g., "api_key": "$OPENAI_API_KEY") which will be resolved at runtime.
Supported providers:
openai-responses: OpenAI models using the Responses API (requires api_key, model)openai-chat-completions: OpenAI models using Chat Completions API (requires api_key, model)amazon-bedrock: AWS Bedrock models (requires region, model_id)The response indicates whether the model was successfully initialized:
success: true, status: ready: Model is available for usesuccess: false, status: failed: Initialization failed (check error field)If initialization fails, the model configuration is still stored and can be retried later using the retry endpoint when the underlying service becomes available.
Returns 422 if the provider type or configuration is invalid.
curl --request POST \
--url http://localhost:8080/api/v2/config/resources/language_models \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"provider": "openai-responses",
"config": {}
}
'{
"success": true,
"status": "ready",
"error": "<string>"
}Specification for adding a new language model.
Unique name/identifier for the language model.The language model provider type (e.g., 'openai-responses', 'openai-chat-completions', 'amazon-bedrock').openai-responses, openai-chat-completions, amazon-bedrock Provider-specific configuration settings.Successful Response