llm.transcribe/v1
A model writes down what's said in audio. Every call names its model as provider/model: a provider the app's admins added in Settings → LLM, a slash, and
that provider's own id for the model. Shared types (File, Usage, ModelInfo, Job, the errors) are in
pocketone.dev/ext/contracts/llm.
A wire contract at /api/_c/llm.transcribe/v1 (transcribe.go), one provider. The
llm extension provides it, over Vultr, Cloudflare Workers AI, OpenRouter and any
OpenAI-compatible API.
Use
In page code it's $llm.transcribe (bound by the llm extension):
const r = await $llm.transcribe.transcribeAsync({ model: "vultr/whisper-large-v3-turbo", audio: { name: "memo.mp3", data: base64Audio } })
r.text
Over HTTP (a superuser, or a token with the scope shown):
| Operation | HTTP | Body | Token scope |
|---|---|---|---|
| Transcribe | POST /api/_c/llm.transcribe/v1/transcribe |
{"model": "...", "audio": {"name": "memo.mp3", "data": "<base64>"}, "language": "en"} |
llm |
| Models | GET /api/_c/llm.transcribe/v1/models |
?provider= (optional) |
llm:read |
It answers {"text", "language", "model", "usage"}. The audio's name (or type) tells the provider its format.
Errors: not_configured (no providers), unknown_model, not_supported, provider (the cloud's own error), timeout.
From Go: transcribev1.Contract.Must(app) (from pocketone.dev/ext/contracts/llm/transcribe/v1).
Provide
Implement transcribev1.Transcribe and provide it in Register (transcribev1.Contract.Provide(app, impl)). Route on the
provider/ prefix, answer not_supported for a provider that can't do this kind, unknown_model for a missing model
or provider, and provider with the cloud's own message (never its key) when the cloud refuses. Fill model with the
full provider/model that answered, and usage with what the provider reports.
Commands and APIs
Every operation is a REST endpoint, a pocketone command and an MCP tool, all generated from the contract and behind the same token scope check and hooks. See Remote CLI, or the full CLI, Extension APIs and MCP references.
transcribe
Writes down what's said in the audio.
| REST | POST /api/_c/llm.transcribe/v1/transcribe |
| CLI | pocketone remote llm transcribe --model <value> --audio <json> --language <value> --prompt <value> --options <json> |
| MCP | llm_transcribe_transcribe |
| Token scope | llm |
| Input field | Flag | Type |
|---|---|---|
model |
--model |
string |
audio |
--audio |
json |
language |
--language |
string |
prompt |
--prompt |
string |
options |
--options |
json |
models
Lists the transcription models of every provider in Settings → LLM.
| REST | GET /api/_c/llm.transcribe/v1/models |
| CLI | pocketone remote llm transcribe models --provider <value> |
| MCP | llm_transcribe_models |
| Token scope | llm:read |
| Input field | Flag | Type |
|---|---|---|
provider |
--provider |
string |
Extensions
| Extension | |
|---|---|
| llm | provides |
License
MIT
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.