PATCH/v2/gen-ai/custom_models/{uuid}/metadata

Update custom model metadata

Updates metadata for a custom model identified by its UUID. Supply any metadata fields you want to change; non-empty input_modalities and output_modalities lists replace the existing lists and are supported only for Spaces-imported models. A 200 response returns the updated custom model.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 8 body fields
uuidstringrequired
The UUID of the custom model whose metadata to update.

Custom model metadata fields to update; all fields are optional.

descriptionstringoptional
A description of the custom model.
input_modalitiesarray<string>optional
Optional new input modalities for the model (replaces existing list when non-empty). Spaces-imported models only.
licensestringoptional
The model's license.
namestringoptional
The custom model's name.
output_modalitiesarray<string>optional
Optional new output modalities for the model (replaces existing list when non-empty). Spaces-imported models only.
parametersstringoptional
The model's parameter count, formatted as an unsigned 64-bit integer string.
tagsobjectoptional
User-defined tags for organizing models
uuidstringoptional
UUID of the custom model to update

6 status codes
200Returns the updated custom model.
modelobjectoptional
Custom model - user-imported model from HuggingFace, Spaces, etc.
401Returned when authentication fails because the credentials are invalid.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the requested resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned when authentication credentials are invalid. A 404 is returned when the resource is not found. A 429 is returned when the API rate limit is exceeded, and a 500 indicates a server error. The uuid path parameter must identify the custom model to update; parameters, if provided, must be a string formatted as an unsigned 64-bit integer.