This is the documentation for the ElevenLabs API. You can use this API to use our service programmatically, this is done by using your xi-api-key.
Bring your own key. This API needs your own ElevenLabs API key - get one from the provider, add it once below, and the proxy injects it on every call. Your OmniStream plan covers the unified SDK, key storage, and proxy - the provider's own rate limits still apply to your key.
This is a community listing. If you own this API, you can request ownership.
npm install omnistream-sdkimport { OmniClient } from "omnistream-sdk";
const omni = new OmniClient({ token: process.env.OMNI_KEY! });
// One key reaches every API on the marketplace.
const data = await omni.call("elevenlabs/Get_generated_items_v1_history_get");One install, one key - the same client calls every API on the marketplace.
Your API key. This is required by most endpoints to access our API programatically. You can view your xi-api-key using the 'Profile' tab on the website.
Get Generated Items
Download History Items
Delete History Item
Get Audio From History Item
Text To Speech
/**
* ElevenLabsAPI - generated by OmniStream from ElevenLabs API's OpenAPI spec.
* One typed method per endpoint. A single Omni key reaches the API.
*/
const DEFAULT_BASE = "https://grid.skinvaults.online/v1/proxy/elevenlabs";
export class ElevenLabsAPIError extends Error {
status: number;
code?: string;
constructor(status: number, code: string | undefined, message?: string) {
super(message || `ElevenLabsAPI error ${status}`);
this.name = "ElevenLabsAPIError";
this.status = status;
this.code = code;
}
}
export interface ElevenLabsAPIOptions {
baseUrl?: string;
fetch?: typeof fetch;
timeoutMs?: number;
}
export class ElevenLabsAPI {
/** @param token Your OmniStream key (one key for every API). */
constructor(private token: string, private opts: ElevenLabsAPIOptions = {}) {
if (!token) throw new Error("ElevenLabsAPI: token is required");
}
rateLimit: { remainingMinute?: number; remainingDay?: number } | null = null;
private async _request(method: string, path: string, { params, body }: { params?: Record<string, unknown>; body?: unknown } = {}): Promise<any> {
const f = this.opts.fetch ?? globalThis.fetch;
const url = new URL((this.opts.baseUrl ?? DEFAULT_BASE).replace(/\/+$/, "") + path);
if (params) for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
const headers: Record<string, string> = { "x-omni-key": this.token };
if (body !== undefined) headers["content-type"] = "application/json";
const res = await f(url, { method, headers, body: body !== undefined ? JSON.stringify(body) : undefined });
this.rateLimit = {
remainingMinute: Number(res.headers.get("x-ratelimit-remaining-minute")) || undefined,
remainingDay: Number(res.headers.get("x-ratelimit-remaining-day")) || undefined,
};
const data = await res.json().catch(() => ({}));
if (!res.ok) throw new ElevenLabsAPIError(res.status, data?.error?.code, data?.error?.message);
return data.data ?? data;
}
/** Get Generated Items */
getGeneratedItemsV1HistoryGet(params: { "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/history", { params });
}
/** Download History Items */
downloadHistoryItemsV1HistoryDownloadPost(body: unknown, params: { "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/history/download", { body, params });
}
/** Delete History Item */
deleteHistoryItemV1HistoryHistoryItemIdDelete(params: { "history_item_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("DELETE", "/v1/history/{history_item_id}", { params });
}
/** Get Audio From History Item */
getAudioFromHistoryItemV1HistoryHistoryItemIdAudioGet(params: { "history_item_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/history/{history_item_id}/audio", { params });
}
/** Text To Speech */
textToSpeechV1TextToSpeechVoiceIdPost(body: unknown, params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/text-to-speech/{voice_id}", { body, params });
}
/** Text To Speech */
textToSpeechV1TextToSpeechVoiceIdStreamPost(body: unknown, params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/text-to-speech/{voice_id}/stream", { body, params });
}
/** Get User Info */
getUserInfoV1UserGet(params: { "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/user", { params });
}
/** Get User Subscription Info */
getUserSubscriptionInfoV1UserSubscriptionGet(params: { "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/user/subscription", { params });
}
/** Get Voices */
getVoicesV1VoicesGet(params: { "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/voices", { params });
}
/** Add Voice */
addVoiceV1VoicesAddPost(params: { "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/voices/add", { params });
}
/** Get Default Voice Settings. */
getDefaultVoiceSettingsV1VoicesSettingsDefaultGet(): Promise<any> {
return this._request("GET", "/v1/voices/settings/default", {});
}
/** Get Voice */
getVoiceV1VoicesVoiceIdGet(params: { "voice_id": string; "with_settings"?: boolean; "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/voices/{voice_id}", { params });
}
/** Delete Voice */
deleteVoiceV1VoicesVoiceIdDelete(params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("DELETE", "/v1/voices/{voice_id}", { params });
}
/** Edit Voice */
editVoiceV1VoicesVoiceIdEditPost(params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/voices/{voice_id}/edit", { params });
}
/** Delete Sample */
deleteSampleV1VoicesVoiceIdSamplesSampleIdDelete(params: { "voice_id": string; "sample_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("DELETE", "/v1/voices/{voice_id}/samples/{sample_id}", { params });
}
/** Get Audio From Sample */
getAudioFromSampleV1VoicesVoiceIdSamplesSampleIdAudioGet(params: { "voice_id": string; "sample_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/voices/{voice_id}/samples/{sample_id}/audio", { params });
}
/** Get Voice Settings */
getVoiceSettingsV1VoicesVoiceIdSettingsGet(params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("GET", "/v1/voices/{voice_id}/settings", { params });
}
/** Edit Voice Settings */
editVoiceSettingsV1VoicesVoiceIdSettingsEditPost(body: unknown, params: { "voice_id": string; "xi-api-key"?: string }): Promise<any> {
return this._request("POST", "/v1/voices/{voice_id}/settings/edit", { body, params });
}
}
export default ElevenLabsAPI;
No reviews yet. Be the first to rate this API.
Yes. ElevenLabs API uses apiKey authentication, so you bring your own key from the provider. You store it once on OmniStream and the proxy injects it into every call, so your code only ever sends your Omni key.
This is the documentation for the ElevenLabs API. You can use this API to use our service programmatically, this is done by using your xi-api-key. It exposes 18 endpoints over GET, POST, DELETE, including GET /v1/history, POST /v1/history/download, DELETE /v1/history/{history_item_id}.
Install the OmniStream SDK for your language and call ElevenLabs API through it. The client is generated from this API's OpenAPI spec, so parameters and responses are fully typed, and the same client also calls every other API in the marketplace.
You can start on the free plan. OmniStream charges for the unified SDK, key storage and proxy rather than for ElevenLabs API itself, and ElevenLabs API's own rate limits still apply to your provider key.
UnoRouter: AI model gateway: one OpenAI-compatible endpoint that routes to many model providers, with usage metering and billing built in.
Text To Speech
Get User Info
Get User Subscription Info
Get Voices
Add Voice
Get Default Voice Settings.
Get Voice
Delete Voice
Edit Voice
Delete Sample
Get Audio From Sample
Get Voice Settings
Edit Voice Settings