curl
curl https://sharemy.ai/v1/audio/translations \
-H "Authorization: Bearer $SHAREMYAI_API_KEY" \
-F file=@interview.m4a \
-F model=whisper-large-v3-turboimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["SHAREMYAI_API_KEY"], base_url="https://sharemy.ai/v1")
with open("interview.m4a", "rb") as audio:
translation = client.audio.translations.create(model="whisper-large-v3-turbo", file=audio)
print(translation.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 translation = await client.audio.translations.create({
model: "whisper-large-v3-turbo",
file: fs.createReadStream("interview.m4a"),
});
console.log(translation.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 translation
Turn a recording in any language into English text or subtitles, with Whisper.
POST
/
v1
/
audio
/
translations
curl
curl https://sharemy.ai/v1/audio/translations \
-H "Authorization: Bearer $SHAREMYAI_API_KEY" \
-F file=@interview.m4a \
-F model=whisper-large-v3-turboimport os
from openai import OpenAI
client = OpenAI(api_key=os.environ["SHAREMYAI_API_KEY"], base_url="https://sharemy.ai/v1")
with open("interview.m4a", "rb") as audio:
translation = client.audio.translations.create(model="whisper-large-v3-turbo", file=audio)
print(translation.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 translation = await client.audio.translations.create({
model: "whisper-large-v3-turbo",
file: fs.createReadStream("interview.m4a"),
});
console.log(translation.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 English text or subtitles, whatever language was spoken. It takes the same fields and gives the same responses as transcriptions, except:
- There is no
languagefield. If one is sent, it is ignored. - In
verbose_json,taskistranslateandlanguageisen.
Audio
WAV, MP3, M4A, OGG, FLAC, WebM or AAC, up to 25 MB and 30 minutes, in amultipart/form-data field named file.
Price
The same as a transcription with the same model: per minute of audio, plus 25% withdiarize. See Credits and pricing.
Differences from OpenAI
response_format:json,text,verbose_json,srtandvtt.timestamp_granularities[]: onlysegment.promptandtemperatureare accepted and ignored.modeldefaults towhisper-base.whisper-1is taken aswhisper-base.- Extra:
diarizelabels who spoke, as in transcriptions.
Authorizations
Body
multipart/form-data