ส่งไฟล์เป็น base64 ในฟิลด์ audio ระบบอ่านรูปแบบและความยาวจากไบต์ของไฟล์ รูปแบบไฟล์ที่รองรับ รูปแบบการเขียนสองแบบ สไตล์สองแบบ เวลาระดับคำ ช่วงผู้พูด คลังคำศัพท์ และขีดจำกัดความยาวกับขนาดอยู่ในคู่มือการถอดเสียง
เฮดเดอร์#
authorizationBearer pxa_...จำเป็นAuthorization: Bearer pxa_... (recommended).
x-api-keypxa_...Alternative to the Authorization header. Ignored when Authorization is present.
idempotency-keystringMakes a retry safe. Two requests carrying the same key charge once and synthesize the same content. One request per key runs at a time. A concurrent duplicate answers 409 idempotency_in_flight. Reuse a key only to retry an identical request. A changed payload is rejected with 422. Accepts up to 200 printable ASCII characters.
เนื้อหา#
audiostringจำเป็นThe recording to transcribe, as the base64 encoding of an MP3, WAV, FLAC, Ogg (Opus or Vorbis), M4A, AAC, or WebM file. The format and the length are read from the file itself. No declared field is consulted. Cost is 500 credits per hour of audio, 8.33 per minute, billed by exact length with a minimum of 0.1 credits per request, charged before transcription and refunded automatically when transcription fails. A recording may run up to 60 minutes, and longer answers 400 audio_too_long. The decoded file may be up to 26,214,400 bytes, and larger answers 413 audio_too_large. A file that cannot be read as one of the seven formats, or whose length cannot be read from its container, answers 400 audio_invalid. A recording with no speech is delivered as an empty transcript and billed for its length. GET /v1/models reports the ceilings as max_duration_seconds and max_bytes.
modelstringจำเป็นTranscription model id, for example paxa-stt-lite-v1-preview. GET /v1/models lists the served catalog.
languagestringThe language the recording is expected to be in, as a BCP 47 tag such as "th" or "en". The hint filters nothing. Speech in any other language is still transcribed as spoken, and a Thai recording that switches into English mid-sentence needs no setting. Omitted, the model detects the language itself. Set the tag when detection has picked the wrong language for a recording.
timestamps"word"Adds a words array to the response, one span per word with its start and end in seconds on the recording's own clock. Thai words are segmented for you. Latin words and numerals arrive whole. The span shape matches the speech API's timing spans. Captions round-trip between the two. Costs nothing extra. Omitted, the response carries the transcript alone.
diarizationbooleantrue adds a segments array to the response, one entry per speaker turn with its speaker number, text, and start and end in seconds. Speakers are numbered from 0 in order of first appearance. Nobody is identified. With word timestamps on as well, every word span names its speaker too. Costs nothing extra. A diarized recording is read in one pass, which is slower to return and holds the recording under 9 minutes. One that long or longer answers 400 diarization_audio_too_long, uncharged. The same recording transcribes normally with this field off. GET /v1/models reports the ceiling as diarization_limit_seconds.
style"verbatim" or "clean"How faithfully the transcript follows the recording. "verbatim", the default, writes exactly what was said: fillers, false starts, and self-corrections included. "clean" drops fillers and merges broken phrases into one, for a transcript that reads more easily. It is a readability choice. A clean transcript departs further from what was said, and our own measurement found it less exact. Any other value answers 400 validation.
convention"spoken" or "written"How the transcript writes what was said. "spoken", the default, writes numbers as they were said (สามสิบเปอร์เซ็นต์) and a word said twice as two words, which is what a verbatim transcript, a subtitle, or a language model reading the text needs. "written" keeps display conventions: digits and units (30%), the repetition mark ๆ, for dictated text that will be read on a page. The word timestamps are the same under both.
vocabularyarray of stringsTerms the recording is likely to contain that the model should recognize as written: product names, people, places, jargon, in Thai or English. Up to 50 terms of 50 characters each, and a longer list or term answers 400 validation. The terms bias recognition and are never inserted; a term that was not said does not appear. Costs nothing extra and combines with every other option.
การตอบกลับ#
The transcribed recording.
textstringจำเป็นThe transcript, verbatim in the language spoken, with no labels, timestamps, or sound annotations. Empty when the recording carried no speech.
wordsarray of objectsOne span per recognized word, in spoken order, each with its text and its start and end in seconds. Present when the request set timestamps to "word"; empty for a recording with no speech. Each span names its speaker when the request set diarization to true.
ดูฟิลด์ย่อยซ่อนฟิลด์ย่อย
words[].textstringจำเป็นThe input text this span covers.
words[].startnumberจำเป็นWhere the span begins in the audio, in seconds.
words[].endnumberจำเป็นWhere the span ends in the audio, in seconds.
words[].speakerintegerThe speaker, numbered from 0 in order of first appearance in the recording. Nobody is identified.
segmentsarray of objectsOne entry per speaker turn, in spoken order. Present when the request set diarization to true; empty for a recording with no speech.
ดูฟิลด์ย่อยซ่อนฟิลด์ย่อย
segments[].speakerintegerจำเป็นThe speaker, numbered from 0 in order of first appearance in the recording. Nobody is identified.
segments[].textstringจำเป็นThe turn's text, exactly as the transcript renders it. Consecutive phrases of one speaker are one turn.
segments[].startnumberจำเป็นWhere the turn begins in the recording, in seconds.
segments[].endnumberจำเป็นWhere the turn ends in the recording, in seconds.
usageobjectจำเป็นWhat the request was billed for.
ดูฟิลด์ย่อยซ่อนฟิลด์ย่อย
usage.secondsnumberจำเป็นLength of the recording this request was billed for, in seconds, exact to a thousandth.
usage.creditsnumberจำเป็นWhat this delivery cost, in credits, exact to a hundredth. An idempotent replay reports the ORIGINAL request's charge, since that one charge is what paid for this delivery too; your balance moves only once.