Skip to content

Create a new LLM provider model

POST
/api/v1/llm_provider_model
curl --request POST \
--url https://app.prefactorai.com/api/v1/llm_provider_model \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api_name": "claude-haiku-4-5", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "llm_provider_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "models_dev_model_name": "claude-haiku-4-5", "models_dev_provider": "anthropic", "name": "Claude Haiku 4.5" }'
LlmProviderModel_DetailsForCreate
object
api_name
required

API model name, unique within the provider ignoring case

string
Example
claude-haiku-4-5
id
One of:
LlmProviderModel_Id

A valid LLM provider model ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
llm_provider_id
required
LlmProvider_Id

A valid LLM provider ID

string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkeny
models_dev_model_name
One of:
string
Example
claude-haiku-4-5
models_dev_provider
One of:
string
Example
anthropic
name
One of:
string
Example
Claude Haiku 4.5

Success

Media typeapplication/json
object
details
required
LlmProviderModel_Details
object
api_name
required

API model name, unique within the provider ignoring case

string
id
required
LlmProviderModel_Id

A valid LLM provider model ID

string
llm_provider_id
required
LlmProvider_Id

A valid LLM provider ID

string
models_dev_model_name
required
One of:
string
models_dev_provider
required
One of:
string
name
required

Model display name, unique within the provider ignoring case

string
type
required

Type of resource (always ‘llm_provider_model’)

string
Allowed values: llm_provider_model
status
required
string
Allowed values: success
Example
{
"details": {
"api_name": "claude-haiku-4-5",
"id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"llm_provider_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny",
"models_dev_model_name": "claude-haiku-4-5",
"models_dev_provider": "anthropic",
"name": "Claude Haiku 4.5",
"type": "llm_provider_model"
},
"status": "success"
}

Error

Media typeapplication/json
One of:
object
code
required
string
Allowed values: bad_request bad_authtoken not_authenticated not_permitted not_implemented unknown not_found unexpected_ref_type unexpected invalid_action invalid_state alert_unknown alert_already_cleared invalid_value required_value idempotency_key_already_used temporarily_unavailable conflict
message
required
string
status
required
string
Allowed values: error
Example
{
"code": "bad_request",
"status": "error"
}