Ana içeriğe geç

Update Model Catalog Entry

Endpoint

PUT /apiops/projects/{projectName}/llm-models/{modelName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
modelNamestringYesModel catalog entry name. If the body name is blank it falls back to this value; otherwise the two must match (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": 32768,
"pricePerMillionInput": 0.20,
"pricePerMillionOutput": 1.80,
"pricePerMillionCached": 0.020,
"pricePerImage": null,
"pricePerAudioMinute": null,
"pricePerCharacterTts": null,
"capabilities": ["chat", "function_calling", "json_mode", "reasoning"],
"modality": "TEXT",
"isDeprecated": false,
"deprecatedAt": null,
"sunsetAt": null,
"builtIn": false
}

Request Body Fields

FieldTypeRequiredDefaultDescription
namestringNopath valueCatalog name in \{providerCode\}/\{modelId\} form. If blank, the modelName path parameter is used; otherwise it must match the path
providerDefinitionIdstringNo-Reference to the owning LLM provider definition
providerCodestringYes-Provider code (e.g. openai). Required for custom entries
modelIdstringYes-Provider-facing model identifier (e.g. gpt-5-mini). Required for custom entries
displayNamestringNo-Human-readable label
contextWindowintegerNo-Context window size in tokens
maxOutputTokensintegerNo-Maximum output tokens; omit to use the provider default
pricePerMillionInputnumberNo-USD per 1M input tokens
pricePerMillionOutputnumberNo-USD per 1M output tokens
pricePerMillionCachednumberNo-USD per 1M cached input tokens
pricePerImagenumberNo-USD per generated image
pricePerAudioMinutenumberNo-USD per minute of audio (STT)
pricePerCharacterTtsnumberNo-USD per input character (TTS)
capabilitiesarray[string]No-Capability tags (e.g. chat, function_calling, vision, embedding, json_mode, reasoning)
modalitystringNo-Model modality: TEXT, VISION, AUDIO, EMBEDDING, RERANK, MULTIMODAL, IMAGE
isDeprecatedbooleanNofalseWhether the model is deprecated
deprecatedAtstringNo-Deprecation announcement time (ISO-8601)
sunsetAtstringNo-Planned removal time (ISO-8601)
builtInbooleanNofalseSee the built-in note below.

Notes

  • Entry must exist: Unlike POST (upsert), PUT requires the named entry to already exist in the project, otherwise a 400 is returned.
  • Name fallback: If name is blank in the body, the modelName path parameter is used. If both are present they must match (case-insensitive).
  • id / projectId are server-managed: The existing entry's id is reused and the entry stays scoped to the path project — a projectId change in the body is rejected (cross-project transfer guard).
  • Built-in entries (builtIn=true): Only the price fields (pricePerMillionInput/Output/Cached, pricePerImage, pricePerAudioMinute, pricePerCharacterTts) are applied; all other fields (name, limits, capabilities, modality) are preserved from the seed.

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true
}
}

Response Fields

FieldTypeDescription
statusstringResponse status: SUCCESS or FAILURE
deploymentResultobjectResult of the update operation
deploymentResult.successbooleanWhether the operation completed successfully

Error Response (400 Bad Request)

{
"status": "FAILURE",
"resultMessage": "Model catalog entry (name: openai/gpt-5-mini) was not found!"
}

or

{
"status": "FAILURE",
"resultMessage": "Model catalog entry name in path (openai/gpt-5-mini) does not match name in body (openai/gpt-5)!"
}

Error Response (401 Unauthorized)

{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}

cURL Example

curl -X PUT \
"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": 32768,
"pricePerMillionInput": 0.20,
"pricePerMillionOutput": 1.80,
"pricePerMillionCached": 0.020,
"capabilities": ["chat", "function_calling", "json_mode", "reasoning"],
"modality": "TEXT",
"builtIn": false
}'

Notes and Warnings

  • Create vs update: Use Create Model Catalog Entry (POST) if you want create-or-update (upsert) semantics; PUT fails when the entry does not exist.
  • Built-in price-only edit: For builtIn=true entries, editing anything other than the price fields has no effect — the seed values are authoritative for structure and capabilities.
  • Name form: The catalog name uses the {providerCode}/{modelId} format. URL-encode the / as %2F in the path.
  • No secret fields: The catalog carries no @SecretData fields and no _class discriminator — nothing is masked, and there is no blank-secret-preservation behaviour.