Create Model Catalog Entry
Endpoint
POST /apiops/projects/{projectName}/llm-models/{modelName}/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| modelName | string | Yes | Model catalog entry name (must match the name in the body, case-insensitive) |
Query Parameters
None
Request Body
Full JSON Body Example
{
"name": "openai/gpt-5-mini",
"providerDefinitionId": "6640aa12c2e4b8000000ef01",
"providerCode": "openai",
"modelId": "gpt-5-mini",
"displayName": "GPT-5 Mini",
"contextWindow": 128000,
"maxOutputTokens": 16384,
"pricePerMillionInput": 0.25,
"pricePerMillionOutput": 2.00,
"pricePerMillionCached": 0.025,
"pricePerImage": null,
"pricePerAudioMinute": null,
"pricePerCharacterTts": null,
"capabilities": ["chat", "function_calling", "json_mode"],
"modality": "TEXT",
"isDeprecated": false,
"deprecatedAt": null,
"sunsetAt": null,
"builtIn": false
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | - | Catalog name in \{providerCode\}/\{modelId\} form; must match the modelName path parameter |
| providerDefinitionId | string | No | - | Reference to the owning LLM provider definition |
| providerCode | string | Yes | - | Provider code (e.g. openai, anthropic). Required for custom entries |
| modelId | string | Yes | - | Provider-facing model identifier (e.g. gpt-5-mini). Required for custom entries |
| displayName | string | No | - | Human-readable label |
| contextWindow | integer | No | - | Context window size in tokens |
| maxOutputTokens | integer | No | - | Maximum output tokens; omit to use the provider default |
| pricePerMillionInput | number | No | - | USD per 1M input tokens |
| pricePerMillionOutput | number | No | - | USD per 1M output tokens |
| pricePerMillionCached | number | No | - | USD per 1M cached input tokens |
| pricePerImage | number | No | - | USD per generated image |
| pricePerAudioMinute | number | No | - | USD per minute of audio (STT) |
| pricePerCharacterTts | number | No | - | USD per input character (TTS) |
| capabilities | array[string] | No | - | Capability tags (e.g. chat, function_calling, vision, embedding, json_mode, reasoning) |
| modality | string | No | - | Model modality: TEXT, VISION, AUDIO, EMBEDDING, RERANK, MULTIMODAL, IMAGE |
| isDeprecated | boolean | No | false | Whether the model is deprecated |
| deprecatedAt | string | No | - | Deprecation announcement time (ISO-8601) |
| sunsetAt | string | No | - | Planned removal time (ISO-8601) |
| builtIn | boolean | No | false | Leave false for custom entries. See the built-in note below. |
Notes
- Upsert: If an entry with the same
namealready exists in the project, it is updated in place (the existing id is reused). Otherwise a new entry is created. - Name match:
modelNamein the path must equal thenamein the body (case-insensitive), or a400is returned. providerCode+modelIdrequired: For custom entries (builtIn=false) both are mandatory.id/projectIdare server-managed: AnyidorprojectIdin the body is ignored — the entry is always scoped to the path project.- Built-in entries (
builtIn=true): Only the price fields (pricePerMillionInput/Output/Cached,pricePerImage,pricePerAudioMinute,pricePerCharacterTts) are applied; all other fields are preserved from the seed. The referenced entry must actually be a persisted built-in, and itsidis required.
Response
Success Response (200 OK)
{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| status | string | Response status: SUCCESS or FAILURE |
| deploymentResult | object | Result of the save operation |
| deploymentResult.success | boolean | Whether the operation completed successfully |
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "Model catalog entry name in path (openai/gpt-5-mini) does not match name in body (openai/gpt-5)!"
}
or
{
"status": "FAILURE",
"resultMessage": "providerCode and modelId are required"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/llm-models/openai%2Fgpt-5-mini/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "openai/gpt-5-mini",
"providerCode": "openai",
"modelId": "gpt-5-mini",
"displayName": "GPT-5 Mini",
"contextWindow": 128000,
"maxOutputTokens": 16384,
"pricePerMillionInput": 0.25,
"pricePerMillionOutput": 2.00,
"pricePerMillionCached": 0.025,
"capabilities": ["chat", "function_calling", "json_mode"],
"modality": "TEXT",
"builtIn": false
}'
Notes and Warnings
- Upsert behaviour:
POST /{modelName}/both creates and updates. To be explicit about updating an existing entry, use Update Model Catalog Entry (PUT), which requires the entry to already exist. - Built-in price-only edit: When
builtIn=true, everything except the price fields is ignored and preserved from the shipped seed. Custom fields cannot be forced onto a built-in model this way. - Name form: The catalog name uses the
{providerCode}/{modelId}format. URL-encode the/as%2Fin the path. - No secret fields: The catalog carries no
@SecretDatafields and no_classdiscriminator — nothing is masked, and there is no secret-preservation-on-blank behaviour to consider.
Related Documentation
- Update Model Catalog Entry - Update an existing entry
- Get Model Catalog Entry - Get a single entry by name
- Model Catalog API - Resource overview
- Authentication Guide - How to obtain and use API tokens
- Error Handling - Error response formats