Update a model
This endpoint uses PATCH semantics, meaning only the fields provided in the request body will be updated; all other fields remain unchanged.
In: header
Path Parameters
The name of the model's owner.
The name of the model.
The name of the model.
The visibility of the model. 'public' models are visible to everyone and can be used and downloaded by anyone. 'restricted' models are visible to everyone and anyone can use these models in the cloud, but only the owner can download them. 'private' models are only visible to the owner and can only be used or downloaded by the owner.
"private" | "public" | "restricted"The description of the model.
The overview of the model.
Source url from where the model's code can be referenced.
License url where the model's usage is specified.
Paper url from where research info on the model can be found.
A list of model category slugs.
Response Body
from wriftai import Clientwriftai = Client()updated_model = wriftai.models.update( "jane-doe/kokoro-82m", {"visibility": "private"},)print(updated_model.visibility){
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "kokoro-82m",
"created_at": "2024-06-12T14:22:31Z",
"visibility": "public",
"description": "A lightweight text-to-speech model that delivers high-quality, natural voice synthesis while remaining fast, efficient, and easy to deploy for both production and personal projects.",
"updated_at": "2024-06-12T14:25:03Z",
"owner": {
"account_id": "8f2b1e4a-9c3d-4f6e-b1a2-7d8e9f0a1b2c",
"name": "jane-doe",
"avatar_url": "https://wrift.ai/avatars/jane-doe.png"
},
"predictions_count": 1284,
"categories": [
{
"name": "Text to Speech",
"slug": "text-to-speech"
}
],
"overview": "Kokoro-82M is an 82 million parameter text-to-speech model that produces natural, expressive speech across multiple voices and languages, optimized for low-latency inference on modest hardware.",
"source_url": "https://huggingface.co/hexgrad/Kokoro-82M",
"license_url": "https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md",
"paper_url": "https://huggingface.co/papers/2203.02395",
"latest_version": {
"schemas": {
"prediction": {
"input": {
"properties": {
"text": {
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"output": {
"properties": {
"audio": {
"type": "string"
}
},
"type": "object"
}
}
},
"compatibilities": {
"anthropic_messages": false,
"openai_chat_completions": false,
"openai_embeddings": false,
"openai_images_generations": false,
"openai_responses": false
},
"size": 524288000,
"container_image_digest": "sha256:1a2b3c4d5e6f7089abcdef1234567890abcdef1234567890abcdef123456789",
"number": 3,
"release_notes": "Improved inference speed by 20% and fixed tokenizer edge cases.",
"created_at": "2024-05-01T09:12:00Z"
},
"cover_image_url": "https://wrift.ai/models/kokoro-82m/cover.png"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}List non private models GET
Retrieve a paginated list of non private models. By default, the models are returned in the order that they were created. When sorting by prediction count, only models that have at least one prediction will be returned.
Create a chat completion POST
OpenAI compatible chat completions endpoint. Note: the auto-generated documentation only displays fields processed by our API. For the complete request and response schema, refer to the official OpenAI Chat Completions API specification. This endpoint also supports additional custom request and response fields beyond the OpenAI spec. Requests that get timed out will be cancelled automatically. This endpoint is experimental and subject to change or removal.