Paxa Labs

เปลี่ยนชื่อเสียงที่ออกแบบเอง

PATCHhttps://api.paxalabs.com/v1/voices/designed/{id}

PATCH /v1/voices/designed/{id} เปลี่ยนชื่อเสียงที่ออกแบบเอง แล้วคืนเสียงนั้น

ดูเป็น Markdown
curl -X PATCH https://api.paxalabs.com/v1/voices/designed/voice_3f9a1c2e7b4d4e8a9c0b1d2e3f4a5b6c \
  -H "Authorization: Bearer $PAXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Nok, night shift"}'
{
  "id": "voice_3f9a1c2e7b4d4e8a9c0b1d2e3f4a5b6c",
  "name": "Nok, night shift",
  "role": "Pharmacist",
  "description": "A calm, warm voice that explains each step slowly.",
  "gender": "f",
  "language": "th",
  "model": "paxa-tts-flash-v2",
  "created_at": "2026-10-23T08:41:16.204Z"
}

id และเสียงยังเหมือนเดิม ชื่อที่ซ้ำกับเสียงในแคตตาล็อกจะตอบ 400 voice_name_taken และ id ที่บัญชีไม่มีจะตอบ 400 unknown_voice การเปลี่ยนชื่อไม่ใช้เครดิตและไม่นับรวมในอัตราจำกัดคำขอ

เฮดเดอร์#

authorizationBearer pxa_...จำเป็น

Authorization: Bearer pxa_... (recommended).

x-api-keypxa_...

Alternative to the Authorization header. Ignored when Authorization is present.

การยืนยันตัวตน

พารามิเตอร์ในพาธ#

idstringจำเป็น

The designed voice's id, starting "voice_".

เนื้อหา#

namestringจำเป็น

The new name, up to 60 characters. A catalog voice's name answers 400 voice_name_taken.

1 to 60 characters

การตอบกลับ#

A designed voice the account saved.

idstringจำเป็น

The voice id, starting "voice_". Send it as voice with model paxa-tts-flash-v2 on POST /v1/tts, POST /v1/audio/speech, or the /v1/tts/live socket.

namestringจำเป็น

Display name, which PATCH changes. The voice field does not accept it.

rolestringจำเป็น

Who the voice is, in a few words.

descriptionstringจำเป็น

How the voice sounds, in one sentence.

gender"f" or "m"จำเป็น

Voice gender, "f" or "m".

language"th" or "en" or "zh"จำเป็น

The one language the voice speaks: "th" (Thai), "en" (English), or "zh" (Mandarin Chinese, Simplified script).

modelstringจำเป็น

The model the voice speaks on.

created_atstringจำเป็น

Save time, ISO 8601.

ข้อผิดพลาด#

400validationThe request body, query, or headers failed validation against the endpoint schema, or broke a rule the endpoint's reference states. A field the schema refused adds two fields to the problem body. path names the first failing field by location and name in dot form, such as body.voice or headers.idempotency-key. A body that could not be read gives the path body alone. reason is one stable code from the validation reasons list.
400unknown_voiceThe voice id names no voice on the model's roster and no designed voice this account holds.
400voice_name_takenThe name is a catalog voice's name, which no designed voice can take. Nothing was saved.
401unauthorizedThe request carried no API key, or the key is invalid or disabled.