ชี้ OpenAI SDK มาที่ https://api.paxalabs.com/v1 แล้วเรียก audio.transcriptions.create ราคา เพดานการใช้งาน และการคืนเครดิตเหมือน POST /v1/stt ซึ่งเป็นที่อยู่ของรูปแบบการเขียน ช่วงผู้พูด เวลาระดับคำ และคลังคำศัพท์ เอนด์พอยต์นี้ไม่อ่านฟิลด์เหล่านั้น ดูการจับคู่ฟิลด์ได้ที่คู่มือใช้ OpenAI SDK กับ Paxa
เฮดเดอร์#
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 are charged once. 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 other than space.
เนื้อหา#
filefileจำเป็นThe recording, as a file part. MP3, WAV (PCM), FLAC, Ogg (Opus or Vorbis), M4A, AAC (ADTS), or WebM; the format and the length are read from the bytes. The part's filename and content type are ignored. Same ceilings, pricing, and refusals as the audio field on POST /v1/stt: up to 60 minutes and 26,214,400 bytes.
modelstringจำเป็นTranscription model id, for example paxa-stt-lite-v1-preview. OpenAI's whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, gpt-4o-mini-transcribe-2025-03-20, gpt-4o-mini-transcribe-2025-12-15 are accepted and run on paxa-stt-lite-v1-preview.
languagestringThe same field OpenAI defines. A BCP 47 tag the recording is expected to be in, such as "th". A hint that filters nothing. Omitted, the model detects the language itself.
response_format"json" or "verbose_json" or "text" or "srt" or "vtt"What the response body carries. "json" (the default) answers application/json with the transcript in a text field. "verbose_json" answers OpenAI's verbose shape: the duration, the text, and the segments and words that timestamp_granularities names. "text" answers text/plain with the transcript alone. "srt" and "vtt" answer the subtitle file, cut the same way POST /v1/stt cuts it, at the default line length. Every format is billed the same, by the recording's length.
timestamp_granularitiesarray of "segment" or "word"sThe same field OpenAI defines, sent as one timestamp_granularities[] form field per value, and read only with verbose_json. "segment" fills segments and "word" fills words; omitted, segments alone are filled.
stream"false"The OpenAI field of the same name. Streamed transcript events are not served here: "true" answers validation, and the transcript arrives as one body. WS /v1/stt/live transcribes as the audio arrives.
การตอบกลับ#
The transcribed recording, in OpenAI's shape. Returned when response_format is "json", "verbose_json", or absent; verbose_json adds the duration, segments, and words.
textstringจำเป็นThe transcript, verbatim in the language spoken. Empty when the recording carried no speech.
languagestringThe language hint the request sent, named as OpenAI names languages, such as "thai", or an empty string when it sent none. Carried by verbose_json.
durationnumberThe recording's length in seconds, carried by verbose_json.
segmentsarray of objectsThe transcript cut into the cues POST /v1/stt cuts for subtitles, carried by verbose_json. OpenAI's decoding statistics are not measured. Their fields carry 0 and an empty tokens list, for clients that require OpenAI's full segment shape.
ดูฟิลด์ย่อยซ่อนฟิลด์ย่อย
segments[].idintegerจำเป็นThe segment's position, from 0.
segments[].seekintegerจำเป็นAlways 0.
segments[].startnumberจำเป็นStart, in seconds.
segments[].endnumberจำเป็นEnd, in seconds.
segments[].textstringจำเป็นThe segment's text, as the transcript renders it.
segments[].tokensarray of integersจำเป็นAlways empty.
segments[].temperaturenumberจำเป็นAlways 0.
segments[].avg_logprobnumberจำเป็นAlways 0.
segments[].compression_rationumberจำเป็นAlways 0.
segments[].no_speech_probnumberจำเป็นAlways 0.
wordsarray of objectsOne entry per word, carried by verbose_json when timestamp_granularities names "word".
ดูฟิลด์ย่อยซ่อนฟิลด์ย่อย
words[].wordstringจำเป็นThe word, with Thai segmented.
words[].startnumberจำเป็นStart, in seconds.
words[].endnumberจำเป็นEnd, in seconds.