curl
curl https://sharemy.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $SHAREMYAI_API_KEY" \
-F file=@meeting.mp3 \
-F model=whisper-base \
-F response_format=verbose_json \
-F diarize=trueimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["SHAREMYAI_API_KEY"], base_url="https://sharemy.ai/v1")
with open("meeting.mp3", "rb") as audio:
transcript = client.audio.transcriptions.create(model="whisper-base", file=audio)
print(transcript.text)import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.SHAREMYAI_API_KEY, baseURL: "https://sharemy.ai/v1" });
const transcript = await client.audio.transcriptions.create({
model: "whisper-base",
file: fs.createReadStream("meeting.mp3"),
});
console.log(transcript.text);{
"text": "<string>"
}{
"error": {
"message": "Choose a temperature from 0 to 2.",
"type": "invalid_request_error",
"param": "temperature",
"code": "invalid_value"
}
}{
"error": {
"message": "Send your API token as Authorization: Bearer smai_…. Create one at https://sharemy.ai, account panel, API tokens.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "This costs 8.192 credits and your balance is 3.000 credits. Add credits at https://sharemy.ai.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota",
"price_credits": 8.192,
"balance_credits": 3
}
}{
"error": {
"message": "This account is suspended. If you think that is a mistake, contact us.",
"type": "invalid_request_error",
"param": null,
"code": "account_suspended"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "model_not_found",
"price_credits": 123,
"balance_credits": 123
}
}{
"error": {
"message": "Send a file of 25 MB or less.",
"type": "invalid_request_error",
"param": "file",
"code": "file_too_large"
}
}{
"error": {
"message": "Send WAV, MP3, M4A, OGG, FLAC, WebM or AAC audio.",
"type": "invalid_request_error",
"param": "file",
"code": "unsupported_audio"
}
}{
"error": {
"message": "At most 4 API calls at once. Wait for one to finish.",
"type": "invalid_request_error",
"param": null,
"code": "rate_limit_exceeded"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "model_not_found",
"price_credits": 123,
"balance_credits": 123
}
}{
"error": {
"message": "The machine running this left the network. (request 69ba81e5-6a67-4cd5-a28b-2e023337b936)",
"type": "api_error",
"param": null,
"code": "network_error"
}
}{
"error": {
"message": "No machine that runs this model is online right now. (request 69ba81e5-6a67-4cd5-a28b-2e023337b936)",
"type": "api_error",
"param": null,
"code": "no_provider"
}
}API reference
Create a transcription
Turn a recording into text or subtitles in the language spoken, with Whisper. Upload audio as multipart/form-data.
POST
/
v1
/
audio
/
transcriptions
curl
curl https://sharemy.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $SHAREMYAI_API_KEY" \
-F file=@meeting.mp3 \
-F model=whisper-base \
-F response_format=verbose_json \
-F diarize=trueimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["SHAREMYAI_API_KEY"], base_url="https://sharemy.ai/v1")
with open("meeting.mp3", "rb") as audio:
transcript = client.audio.transcriptions.create(model="whisper-base", file=audio)
print(transcript.text)import fs from "node:fs";
import OpenAI from "openai";
const client = new OpenAI({ apiKey: process.env.SHAREMYAI_API_KEY, baseURL: "https://sharemy.ai/v1" });
const transcript = await client.audio.transcriptions.create({
model: "whisper-base",
file: fs.createReadStream("meeting.mp3"),
});
console.log(transcript.text);{
"text": "<string>"
}{
"error": {
"message": "Choose a temperature from 0 to 2.",
"type": "invalid_request_error",
"param": "temperature",
"code": "invalid_value"
}
}{
"error": {
"message": "Send your API token as Authorization: Bearer smai_…. Create one at https://sharemy.ai, account panel, API tokens.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}{
"error": {
"message": "This costs 8.192 credits and your balance is 3.000 credits. Add credits at https://sharemy.ai.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota",
"price_credits": 8.192,
"balance_credits": 3
}
}{
"error": {
"message": "This account is suspended. If you think that is a mistake, contact us.",
"type": "invalid_request_error",
"param": null,
"code": "account_suspended"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "model_not_found",
"price_credits": 123,
"balance_credits": 123
}
}{
"error": {
"message": "Send a file of 25 MB or less.",
"type": "invalid_request_error",
"param": "file",
"code": "file_too_large"
}
}{
"error": {
"message": "Send WAV, MP3, M4A, OGG, FLAC, WebM or AAC audio.",
"type": "invalid_request_error",
"param": "file",
"code": "unsupported_audio"
}
}{
"error": {
"message": "At most 4 API calls at once. Wait for one to finish.",
"type": "invalid_request_error",
"param": null,
"code": "rate_limit_exceeded"
}
}{
"error": {
"message": "<string>",
"type": "invalid_request_error",
"param": "<string>",
"code": "model_not_found",
"price_credits": 123,
"balance_credits": 123
}
}{
"error": {
"message": "The machine running this left the network. (request 69ba81e5-6a67-4cd5-a28b-2e023337b936)",
"type": "api_error",
"param": null,
"code": "network_error"
}
}{
"error": {
"message": "No machine that runs this model is online right now. (request 69ba81e5-6a67-4cd5-a28b-2e023337b936)",
"type": "api_error",
"param": null,
"code": "no_provider"
}
}Turns a recording into text or subtitles in the language spoken, with one of the Whisper models. Send the audio as
With the OpenAI Python SDK, send it with
multipart/form-data in a field named file.
Audio
- Formats: WAV, MP3, M4A (MP4 audio), OGG, FLAC, WebM and AAC.
- Size: up to 25 MB (26,214,400 bytes).
- Length: up to 30 minutes.
Formats
response_format | Content-Type | What you get |
|---|---|---|
json (default) | application/json | {"text": "..."} |
verbose_json | application/json | task, language, duration, text and timed segments |
text | text/plain | The transcript |
srt | application/x-subrip | SubRip subtitles |
vtt | text/vtt | WebVTT subtitles |
Speakers
diarize is not part of OpenAI’s API. Send diarize=true (or 1) to label who spoke:
- In
verbose_json, each segment has aspeaker, andspeakerslists them all. - In
srtandvtt, each cue starts with the speaker’s name.
curl https://sharemy.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $SHAREMYAI_API_KEY" \
-F file=@meeting.mp3 \
-F model=whisper-base \
-F response_format=srt \
-F diarize=true
extra_body={"diarize": "true"}.
Language
Sendlanguage as an ISO-639-1 code, such as en or fr, if you know it. Leave it out, or send auto, to detect it.
Price
Priced per minute of audio, and never less than 15 seconds’ worth. See Credits and pricing.Differences from OpenAI
timestamp_granularities[]: onlysegment.wordis refused.promptandtemperatureare accepted and ignored.modeldefaults towhisper-base.whisper-1is taken aswhisper-base.- Not supported:
stream,include[],chunking_strategy. They are ignored. - Extra:
diarize, above.
Authorizations
Body
multipart/form-data