---
title: "Create Model for Users via API"
method: POST
path: "/model"
tags: ["Model"]
---

# Create Model for Users via API

`POST /model`

## Request body

- object
  - `visibility` 'public' | 'unlist' | 'private' — Model visibility, public will be shown in the discovery page, unlist allows anyone with the link to access, private only be visible to the creator
  - `type` 'tts', required — Model type, tts is for text to speech
  - `title` string, required — Model title or name
  - `description` string, nullable — Model description
  - `cover_image` string, binary, nullable — Model cover image, this is required if the model is public
  - `train_mode` 'fast', required — Model train mode, for TTS model, fast means model instantly available after creation
  - `voices` union, required — Upload voices files that will be used to tune the model
    - string[]
    - string, binary
  - `texts` union — Texts corresponding to the voices, if unspecified, ASR will be performed on the voices
    - string[]
    - string
  - `tags` union — Model tags
    - string[]
    - string
  - `enhance_audio_quality` boolean — Enhance audio quality
  - `generate_sample` boolean — Generate default text

## Response `201`

Document created, URL follows

- object
  - `_id` string, required
  - `type` 'svc' | 'tts', required
  - `title` string, required
  - `description` string
  - `cover_image` string
  - `train_mode` 'fast' | 'full'
  - `state` 'created' | 'training' | 'trained' | 'failed', required
  - `tags` string[], required
  - `samples` SampleEntity[]
    - `title` string, required
    - `text` string, required
    - `task_id` string, required
    - `audio` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `languages` string[]
  - `visibility` 'public' | 'unlist' | 'private', required
  - `lock_visibility` boolean
  - `dmca_taken_down` boolean, nullable
  - `default_text` string
  - `source` string, nullable
  - `quality` ModelQualityEntity
    - `audios` ModelAudioQualityEntity[]
      - `filename` string, required
      - `duration_ms` number, required
      - `language` string
      - `quality` object
      - `quality_passed` boolean
      - `quality_reason` string
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `like_count` integer, required
  - `mark_count` integer, required
  - `shared_count` integer, required
  - `task_count` integer, required
  - `unliked` boolean
  - `liked` boolean
  - `marked` boolean
  - `author` AuthorEntity, required
    - `_id` string, required
    - `nickname` string, required
    - `avatar` string, required

## Other responses

- `401` — No permission -- see authorization schemes
- `422`

---

[API](https://skmtc.dev/fish/apis/fishaudio-openapi.md) · [All operations](https://skmtc.dev/fish/apis/fishaudio-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fish/fishaudio-openapi/revisions/bca9c1115c42/schema)
