export type CreateApiAllmodelsOaiAudioTranscriptionsArgs = {body: {file: string, model: string, language?: string | undefined, response_format?: string | undefined, 'timestamp_granularities[]'?: Array | undefined}}; export type CreateApiAllmodelsOaiAudioTranscriptionsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Transcribe audio files using the OpenAI SDK-compatible endpoint. Supports all AllModels STT providers. Accepts WAV, MP3, FLAC, MP4/M4A, OGG, and WebM. * * POST /allmodels/oai/audio/transcriptions */ export const createApiAllmodelsOaiAudioTranscriptions = async (args: CreateApiAllmodelsOaiAudioTranscriptionsArgs, options?: CreateApiAllmodelsOaiAudioTranscriptionsOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/allmodels/oai/audio/transcriptions${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };