sarvamai 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/chat/client/requests/CreateChatCompletionV2Request.d.ts +5 -7
- package/dist/cjs/api/resources/docAi/client/requests/DocAiParseRequest.d.ts +1 -1
- package/dist/cjs/api/resources/dubbing/client/requests/CreateDubbingJobRequest.d.ts +1 -1
- package/dist/cjs/api/resources/responses/client/requests/ResponsesCreateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/responses/client/requests/ResponsesCreateStreamRequest.d.ts +4 -4
- package/dist/cjs/api/resources/voiceCloning/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/voiceCloning/client/Client.js +2 -2
- package/dist/cjs/api/types/Choice.d.ts +1 -1
- package/dist/cjs/api/types/CreateDubbingJobData.d.ts +1 -1
- package/dist/cjs/api/types/CreateResponseV2Request.d.ts +4 -4
- package/dist/cjs/api/types/DubbingExportType.d.ts +1 -1
- package/dist/cjs/api/types/DubbingExportType.js +1 -1
- package/dist/cjs/api/types/DubbingModelTier.d.ts +1 -1
- package/dist/cjs/api/types/DubbingModelTier.js +1 -1
- package/dist/cjs/api/types/ReasoningEffort.d.ts +2 -1
- package/dist/cjs/api/types/ReasoningEffort.js +2 -1
- package/dist/cjs/api/types/ResponseReasoning.d.ts +2 -2
- package/dist/cjs/api/types/ResponseReasoningEffort.d.ts +2 -1
- package/dist/cjs/api/types/ResponseReasoningEffort.js +2 -1
- package/dist/cjs/api/types/ResponsesModelIds.d.ts +13 -3
- package/dist/cjs/api/types/ResponsesModelIds.js +13 -3
- package/dist/cjs/api/types/V2ModelIds.d.ts +13 -3
- package/dist/cjs/api/types/V2ModelIds.js +13 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/chat/client/requests/CreateChatCompletionV2Request.d.mts +5 -7
- package/dist/esm/api/resources/docAi/client/requests/DocAiParseRequest.d.mts +1 -1
- package/dist/esm/api/resources/dubbing/client/requests/CreateDubbingJobRequest.d.mts +1 -1
- package/dist/esm/api/resources/responses/client/requests/ResponsesCreateRequest.d.mts +4 -4
- package/dist/esm/api/resources/responses/client/requests/ResponsesCreateStreamRequest.d.mts +4 -4
- package/dist/esm/api/resources/voiceCloning/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/voiceCloning/client/Client.mjs +2 -2
- package/dist/esm/api/types/Choice.d.mts +1 -1
- package/dist/esm/api/types/CreateDubbingJobData.d.mts +1 -1
- package/dist/esm/api/types/CreateResponseV2Request.d.mts +4 -4
- package/dist/esm/api/types/DubbingExportType.d.mts +1 -1
- package/dist/esm/api/types/DubbingExportType.mjs +1 -1
- package/dist/esm/api/types/DubbingModelTier.d.mts +1 -1
- package/dist/esm/api/types/DubbingModelTier.mjs +1 -1
- package/dist/esm/api/types/ReasoningEffort.d.mts +2 -1
- package/dist/esm/api/types/ReasoningEffort.mjs +2 -1
- package/dist/esm/api/types/ResponseReasoning.d.mts +2 -2
- package/dist/esm/api/types/ResponseReasoningEffort.d.mts +2 -1
- package/dist/esm/api/types/ResponseReasoningEffort.mjs +2 -1
- package/dist/esm/api/types/ResponsesModelIds.d.mts +13 -3
- package/dist/esm/api/types/ResponsesModelIds.mjs +13 -3
- package/dist/esm/api/types/V2ModelIds.d.mts +13 -3
- package/dist/esm/api/types/V2ModelIds.mjs +13 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +7 -7
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "sarvamai",
|
|
46
|
-
"X-Fern-SDK-Version": "1.1.
|
|
47
|
-
"User-Agent": "sarvamai/1.1.
|
|
46
|
+
"X-Fern-SDK-Version": "1.1.14",
|
|
47
|
+
"User-Agent": "sarvamai/1.1.14",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -20,14 +20,14 @@ export interface CreateChatCompletionV2Request {
|
|
|
20
20
|
temperature?: number;
|
|
21
21
|
/** Nucleus sampling: greater than `0` and at most `1`. On `glm5.3`, `top_p: 0` is rejected. Prefer changing either `top_p` or `temperature`, not both. */
|
|
22
22
|
top_p?: number;
|
|
23
|
-
/** On reasoning models (`glm5.3`, `deepseekv4.1-flash`): **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**
|
|
23
|
+
/** On reasoning models (`glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`): **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**, except **`high`** on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`, and no reasoning on `gemma4`. **`none`** turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; on `mimo-v2.6-*`, any other value only switches thinking on. `kimi-k3` always thinks. Trace in `message.reasoning_content`; billed as completion tokens and counts toward `max_tokens`. On `gemma4`, reasoning is off unless this is set (`low`, `high`, or `max`). */
|
|
24
24
|
reasoning_effort?: SarvamAI.ReasoningEffort;
|
|
25
25
|
/** Maximum tokens to generate in the completion, including reasoning tokens on reasoning models. Default `2048`. Set explicitly when you need longer answers — a low limit can yield `finish_reason: "length"` with little or no visible `content` if reasoning consumes the budget. */
|
|
26
26
|
max_tokens?: number;
|
|
27
27
|
/** Optional. Default `false` — omit or `false` for one JSON response. If `true`, the response is streamed as server-sent events and ends with a `[DONE]` line. Use `stream_options.include_usage: true` to receive a final usage chunk (including `reasoning_tokens`). That chunk has an empty `choices` array — do not assume `choices[0]` is present on every event. */
|
|
28
28
|
stream?: boolean;
|
|
29
29
|
stop?: SarvamAI.StopConfiguration;
|
|
30
|
-
/** Number of chat completion choices to generate per request. You are billed for tokens across all choices. Default `1`. On `glm5.3`, only `n: 1` is accepted; higher values return `400 invalid_request_error`. */
|
|
30
|
+
/** Number of chat completion choices to generate per request. You are billed for tokens across all choices. Default `1`. On `glm5.3`, only `n: 1` is accepted; higher values return `400 invalid_request_error`. `n` > 1 needs `temperature` greater than `0` on every model; `temperature: 0` returns `400`. */
|
|
31
31
|
n?: number;
|
|
32
32
|
/** Optional integer seed for OpenAI SDK compatibility. */
|
|
33
33
|
seed?: number;
|
|
@@ -53,16 +53,14 @@ export interface CreateChatCompletionV2Request {
|
|
|
53
53
|
extra_body?: Record<string, unknown>;
|
|
54
54
|
/** Top-k sampling. Omit or set to `-1` to disable. Values `>= 1` enable top-k; `0` is rejected. There is no documented upper bound. */
|
|
55
55
|
top_k?: number;
|
|
56
|
-
/** Minimum probability mass. Must be between 0 and 1 inclusive. Outside that range is `400`. */
|
|
57
|
-
min_p?: number;
|
|
58
56
|
/** Repetition penalty. Must be greater than 0 and at most 2. `0` and values above 2 are `400`. */
|
|
59
57
|
repetition_penalty?: number;
|
|
60
|
-
/** **`false`**
|
|
58
|
+
/** **`false`** limits a turn to a single tool call on every model. */
|
|
61
59
|
parallel_tool_calls?: boolean;
|
|
62
60
|
/** Only valid with `stream: true` (otherwise `400`). Must be a top-level field, not inside `extra_body`. Use `{"include_usage": true}` to receive token usage in the final SSE chunk. */
|
|
63
61
|
stream_options?: SarvamAI.ChatStreamOptions;
|
|
64
|
-
/** If `true`, return log probabilities for output tokens (use with `top_logprobs`). Supported on **`sarvam-105b
|
|
62
|
+
/** If `true`, return log probabilities for output tokens (use with `top_logprobs`). Supported on **`sarvam-105b`**, **`gemma4`**, **`glm5.3-flash`**, **`deepseekv4.1-flash-1017`**, **`deepseekv4-pro`**, **`kimi-k3`**, **`mimo-v2.6-flash`**, and **`mimo-v2.6-pro`**. Not supported on **`glm5.3`** (`400` if enabled). */
|
|
65
63
|
logprobs?: boolean;
|
|
66
|
-
/** How many top token log probabilities to return at each position when `logprobs` is `true
|
|
64
|
+
/** How many top token log probabilities to return at each position. Takes effect only when `logprobs` is `true`; without it, some models ignore the field and others return **`400`**. Same model support as `logprobs`: works on `sarvam-105b`, `gemma4`, `glm5.3-flash`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; on `glm5.3`, omit entirely — do not send `0`, since many SDKs add it by default. */
|
|
67
65
|
top_logprobs?: number;
|
|
68
66
|
}
|
|
@@ -8,7 +8,7 @@ export interface DocAiParseRequest {
|
|
|
8
8
|
file?: core.file.Uploadable[] | undefined;
|
|
9
9
|
/** Comma-separated upload IDs returned by `POST /doc-ai/v1/job/upload`. Exactly one of `file` and `upload_ids` must be provided. */
|
|
10
10
|
upload_ids?: string;
|
|
11
|
-
/** Language of the document in BCP-47 format (e.g. `hi-IN`, `en-IN`). Defaults to Indic: when omitted, the document is processed as an Indic-language document. To process an English document, set `language` to `en-IN`. Sarvam Vision supports 22 Indian languages plus English; see the [Sarvam Vision model page](/api/
|
|
11
|
+
/** Language of the document in BCP-47 format (e.g. `hi-IN`, `en-IN`). Defaults to Indic: when omitted, the document is processed as an Indic-language document. To process an English document, set `language` to `en-IN`. Sarvam Vision supports 22 Indian languages plus English; see the [Sarvam Vision model page](/api/api-guides-tutorials/models/sarvam-vision) for the full list. */
|
|
12
12
|
language?: string;
|
|
13
13
|
/** Nature of the document content. */
|
|
14
14
|
content_type?: DocAiParseRequest.ContentType;
|
|
@@ -17,7 +17,7 @@ export interface CreateDubbingJobRequest {
|
|
|
17
17
|
src_lang: SarvamAI.DubbingLanguage;
|
|
18
18
|
/** One or more target languages to dub into. A single job dubs into all of them. */
|
|
19
19
|
target_langs: SarvamAI.DubbingLanguage[];
|
|
20
|
-
/** Which formats to auto-produce per target language. When provided, only the listed formats are auto-exported.
|
|
20
|
+
/** Which formats to auto-produce per target language. When provided, only the listed formats are auto-exported. Accepted values: `video` (dubbed MP4), `audio` (dubbed voice over the background, `.wav`), `audio_vocals` (dubbed voice alone, `.wav`), `srt` and `vtt` (subtitles of the dubbed text). When omitted, only the dubbed video (MP4) is produced; request audio and subtitles explicitly. Audio-only sources cannot produce a video, so `video` resolves to `audio` for them. */
|
|
21
21
|
export_options?: SarvamAI.DubbingExportOption[];
|
|
22
22
|
/** Clone the original speaker's voice. Set `false` to use a preset `voice_id` instead. */
|
|
23
23
|
voice_cloning?: boolean;
|
|
@@ -19,7 +19,7 @@ export interface ResponsesCreateRequest {
|
|
|
19
19
|
tools?: SarvamAI.ResponseFunctionTool[];
|
|
20
20
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
21
21
|
tool_choice?: ResponsesCreateRequest.ToolChoice;
|
|
22
|
-
/** Optional reasoning config for `glm5.3`
|
|
22
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
23
23
|
reasoning?: SarvamAI.ResponseReasoning;
|
|
24
24
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
25
25
|
extra_body?: Record<string, unknown>;
|
|
@@ -27,15 +27,15 @@ export interface ResponsesCreateRequest {
|
|
|
27
27
|
instructions?: string;
|
|
28
28
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
29
29
|
top_p?: number;
|
|
30
|
-
/**
|
|
30
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
31
31
|
top_k?: number;
|
|
32
32
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
33
33
|
frequency_penalty?: number;
|
|
34
34
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
35
35
|
presence_penalty?: number;
|
|
36
|
-
/** Output format
|
|
36
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
37
37
|
text?: SarvamAI.ResponseTextConfig;
|
|
38
|
-
/**
|
|
38
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
39
39
|
parallel_tool_calls?: boolean;
|
|
40
40
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
41
41
|
n?: number;
|
|
@@ -19,7 +19,7 @@ export interface ResponsesCreateStreamRequest {
|
|
|
19
19
|
tools?: SarvamAI.ResponseFunctionTool[];
|
|
20
20
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
21
21
|
tool_choice?: ResponsesCreateStreamRequest.ToolChoice;
|
|
22
|
-
/** Optional reasoning config for `glm5.3`
|
|
22
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
23
23
|
reasoning?: SarvamAI.ResponseReasoning;
|
|
24
24
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
25
25
|
extra_body?: Record<string, unknown>;
|
|
@@ -27,15 +27,15 @@ export interface ResponsesCreateStreamRequest {
|
|
|
27
27
|
instructions?: string;
|
|
28
28
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
29
29
|
top_p?: number;
|
|
30
|
-
/**
|
|
30
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
31
31
|
top_k?: number;
|
|
32
32
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
33
33
|
frequency_penalty?: number;
|
|
34
34
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
35
35
|
presence_penalty?: number;
|
|
36
|
-
/** Output format
|
|
36
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
37
37
|
text?: SarvamAI.ResponseTextConfig;
|
|
38
|
-
/**
|
|
38
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
39
39
|
parallel_tool_calls?: boolean;
|
|
40
40
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
41
41
|
n?: number;
|
|
@@ -92,7 +92,7 @@ export declare class VoiceCloningClient {
|
|
|
92
92
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
93
93
|
* **Auth:** send your key in the `api-subscription-key` header.
|
|
94
94
|
*
|
|
95
|
-
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g.
|
|
95
|
+
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 `TIER_LIMIT_REACHED` when the cap is hit.
|
|
96
96
|
*
|
|
97
97
|
* **Billing:** charged against the voice cloning API. See the [pricing page](https://docs.sarvam.ai/api/getting-started/pricing).
|
|
98
98
|
*
|
|
@@ -160,7 +160,7 @@ export declare class VoiceCloningClient {
|
|
|
160
160
|
getVoice(voice_id: string, requestOptions?: VoiceCloningClient.RequestOptions): core.HttpResponsePromise<SarvamAI.VoiceLibraryDetailResponse>;
|
|
161
161
|
private __getVoice;
|
|
162
162
|
/**
|
|
163
|
-
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the
|
|
163
|
+
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the Starter (pay as you go) plan (capped at 50 voices across your organization), deleting a voice frees a slot. Pro and Enterprise plans have higher limits.
|
|
164
164
|
*
|
|
165
165
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
166
166
|
* **Auth:** send your key in the `api-subscription-key` header. Returns `204 No Content` on success.
|
|
@@ -317,7 +317,7 @@ class VoiceCloningClient {
|
|
|
317
317
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
318
318
|
* **Auth:** send your key in the `api-subscription-key` header.
|
|
319
319
|
*
|
|
320
|
-
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g.
|
|
320
|
+
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 `TIER_LIMIT_REACHED` when the cap is hit.
|
|
321
321
|
*
|
|
322
322
|
* **Billing:** charged against the voice cloning API. See the [pricing page](https://docs.sarvam.ai/api/getting-started/pricing).
|
|
323
323
|
*
|
|
@@ -532,7 +532,7 @@ class VoiceCloningClient {
|
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
/**
|
|
535
|
-
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the
|
|
535
|
+
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the Starter (pay as you go) plan (capped at 50 voices across your organization), deleting a voice frees a slot. Pro and Enterprise plans have higher limits.
|
|
536
536
|
*
|
|
537
537
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
538
538
|
* **Auth:** send your key in the `api-subscription-key` header. Returns `204 No Content` on success.
|
|
@@ -9,7 +9,7 @@ export interface Choice {
|
|
|
9
9
|
finish_reason: SarvamAI.FinishReason;
|
|
10
10
|
/** The index of the choice in the list of choices. */
|
|
11
11
|
index: number;
|
|
12
|
-
/** Token log probabilities when supported (`sarvam-105b`, `gemma4`). Always `null` on `glm5.3
|
|
12
|
+
/** Token log probabilities when supported (`sarvam-105b`, `gemma4`, `glm5.3-flash`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`). Always `null` on `glm5.3`, which doesn't support this field. */
|
|
13
13
|
logprobs?: Record<string, unknown> | undefined;
|
|
14
14
|
message: SarvamAI.ChatCompletionResponseMessage;
|
|
15
15
|
}
|
|
@@ -12,6 +12,6 @@ export interface CreateDubbingJobData {
|
|
|
12
12
|
voice_cloning: boolean;
|
|
13
13
|
voice_id?: string | undefined;
|
|
14
14
|
pace_preset?: string | undefined;
|
|
15
|
-
/** Echo of the requested quality tier (`plus`/`lite`), or null when the service default was used. */
|
|
15
|
+
/** Echo of the requested quality tier (`plus`/`lite`/`auto`), or null when the service default was used. */
|
|
16
16
|
model_tier?: string | undefined;
|
|
17
17
|
}
|
|
@@ -14,7 +14,7 @@ export interface CreateResponseV2Request {
|
|
|
14
14
|
tools?: SarvamAI.ResponseFunctionTool[] | undefined;
|
|
15
15
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
16
16
|
tool_choice?: CreateResponseV2Request.ToolChoice | undefined;
|
|
17
|
-
/** Optional reasoning config for `glm5.3`
|
|
17
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
18
18
|
reasoning?: SarvamAI.ResponseReasoning | undefined;
|
|
19
19
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
20
20
|
extra_body?: Record<string, unknown> | undefined;
|
|
@@ -22,15 +22,15 @@ export interface CreateResponseV2Request {
|
|
|
22
22
|
instructions?: string | undefined;
|
|
23
23
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
24
24
|
top_p?: number | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
26
26
|
top_k?: number | undefined;
|
|
27
27
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
28
28
|
frequency_penalty?: number | undefined;
|
|
29
29
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
30
30
|
presence_penalty?: number | undefined;
|
|
31
|
-
/** Output format
|
|
31
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
32
32
|
text?: SarvamAI.ResponseTextConfig | undefined;
|
|
33
|
-
/**
|
|
33
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
34
34
|
parallel_tool_calls?: boolean | undefined;
|
|
35
35
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
36
36
|
n?: number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Export format. `audio` is uncompressed `.wav
|
|
1
|
+
/** Export format. `video` is the dubbed MP4. `audio` is the dubbed voice over the background, as uncompressed `.wav`. `audio_vocals` is the dubbed voice alone, as `.wav`. `srt` and `vtt` are subtitles of the dubbed text. */
|
|
2
2
|
export declare const DubbingExportType: {
|
|
3
3
|
readonly Video: "video";
|
|
4
4
|
readonly Audio: "audio";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.DubbingExportType = void 0;
|
|
5
|
-
/** Export format. `audio` is uncompressed `.wav
|
|
5
|
+
/** Export format. `video` is the dubbed MP4. `audio` is the dubbed voice over the background, as uncompressed `.wav`. `audio_vocals` is the dubbed voice alone, as `.wav`. `srt` and `vtt` are subtitles of the dubbed text. */
|
|
6
6
|
exports.DubbingExportType = {
|
|
7
7
|
Video: "video",
|
|
8
8
|
Audio: "audio",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Translation quality tier: `plus` (highest quality), `lite` (faster, lighter) or `auto` (balances quality and efficiency). Defaults to `auto`. */
|
|
2
2
|
export declare const DubbingModelTier: {
|
|
3
3
|
readonly Plus: "plus";
|
|
4
4
|
readonly Lite: "lite";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.DubbingModelTier = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/** Translation quality tier: `plus` (highest quality), `lite` (faster, lighter) or `auto` (balances quality and efficiency). Defaults to `auto`. */
|
|
6
6
|
exports.DubbingModelTier = {
|
|
7
7
|
Plus: "plus",
|
|
8
8
|
Lite: "lite",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** Reasoning depth on `glm5.3`
|
|
1
|
+
/** Reasoning depth on `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`: `low`, `high`, or `max`. Default when omitted is `max` (`high` on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`; no reasoning on `gemma4`). `none` turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; other models reject it or keep thinking. */
|
|
2
2
|
export declare const ReasoningEffort: {
|
|
3
|
+
readonly None: "none";
|
|
3
4
|
readonly Low: "low";
|
|
4
5
|
readonly High: "high";
|
|
5
6
|
readonly Max: "max";
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ReasoningEffort = void 0;
|
|
5
|
-
/** Reasoning depth on `glm5.3`
|
|
5
|
+
/** Reasoning depth on `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`: `low`, `high`, or `max`. Default when omitted is `max` (`high` on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`; no reasoning on `gemma4`). `none` turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; other models reject it or keep thinking. */
|
|
6
6
|
exports.ReasoningEffort = {
|
|
7
|
+
None: "none",
|
|
7
8
|
Low: "low",
|
|
8
9
|
High: "high",
|
|
9
10
|
Max: "max",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as SarvamAI from "../index.js";
|
|
2
2
|
export interface ResponseReasoning {
|
|
3
|
-
/** `low`, `high`, or `max`. On **`glm5.3`**
|
|
3
|
+
/** `low`, `high`, or `max`. On **`glm5.3`** and **`glm5.3-flash`**, sending the literal string `max` returns `400`; omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. **`deepseekv4.1-flash-1017`**, **`deepseekv4-pro`**, **`kimi-k3`**, **`mimo-v2.6-flash`**, and **`mimo-v2.6-pro`** accept `max` directly on this route. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting it means no reasoning. */
|
|
4
4
|
effort?: SarvamAI.ResponseReasoningEffort | undefined;
|
|
5
|
-
/** `auto` or `detailed`.
|
|
5
|
+
/** `auto` or `detailed`. Without it, the reasoning item's `summary` is empty; read the trace from `content[0].text`. */
|
|
6
6
|
summary?: ResponseReasoning.Summary | undefined;
|
|
7
7
|
/** Accepts any additional properties */
|
|
8
8
|
[key: string]: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** Reasoning effort on the Responses route. `deepseekv4.1-flash`
|
|
1
|
+
/** Reasoning effort on the Responses route. `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro` accept all three values directly. `glm5.3` and `glm5.3-flash` accept `low` and `high`; the literal string `max` returns `400` on them. Omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting the field means no reasoning. */
|
|
2
2
|
export declare const ResponseReasoningEffort: {
|
|
3
|
+
readonly None: "none";
|
|
3
4
|
readonly Low: "low";
|
|
4
5
|
readonly High: "high";
|
|
5
6
|
readonly Max: "max";
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.ResponseReasoningEffort = void 0;
|
|
5
|
-
/** Reasoning effort on the Responses route. `deepseekv4.1-flash`
|
|
5
|
+
/** Reasoning effort on the Responses route. `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro` accept all three values directly. `glm5.3` and `glm5.3-flash` accept `low` and `high`; the literal string `max` returns `400` on them. Omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting the field means no reasoning. */
|
|
6
6
|
exports.ResponseReasoningEffort = {
|
|
7
|
+
None: "none",
|
|
7
8
|
Low: "low",
|
|
8
9
|
High: "high",
|
|
9
10
|
Max: "max",
|
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **`sarvam-105b`** — Sarvam flagship model.
|
|
5
5
|
* - **`glm5.3`** — 1,048,576-token context; reasoning in `output` as a `reasoning` item; flat function tools; max request size 10,485,760 bytes.
|
|
6
|
-
* - **`
|
|
7
|
-
* - **`
|
|
6
|
+
* - **`glm5.3-flash`** — long context, vision (inline base64 images), tools, and reasoning; `reasoning.effort` accepts `low` or `high` only, as on `glm5.3`.
|
|
7
|
+
* - **`gemma4`** — 262,144-token context, vision (inline base64 images), tools, and optional reasoning (`reasoning.effort` `low` or `high`).
|
|
8
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — long context, tools, and reasoning.
|
|
9
|
+
* - **`deepseekv4-pro`** (beta) — long context, text input, tools, and reasoning (default `high`).
|
|
10
|
+
* - **`kimi-k3`** (beta) — long context, image input (inline base64; no video on this route), tools, and reasoning (always on).
|
|
11
|
+
* - **`mimo-v2.6-flash`** (beta) — long context, image and audio input (inline base64; no video on this route), tools, and reasoning (on by default).
|
|
12
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
8
13
|
*/
|
|
9
14
|
export declare const ResponsesModelIds: {
|
|
10
15
|
readonly Sarvam105B: "sarvam-105b";
|
|
11
16
|
readonly Glm53: "glm5.3";
|
|
17
|
+
readonly Glm53Flash: "glm5.3-flash";
|
|
12
18
|
readonly Gemma4: "gemma4";
|
|
13
|
-
readonly
|
|
19
|
+
readonly Deepseekv41Flash1017: "deepseekv4.1-flash-1017";
|
|
20
|
+
readonly Deepseekv4Pro: "deepseekv4-pro";
|
|
21
|
+
readonly KimiK3: "kimi-k3";
|
|
22
|
+
readonly MimoV26Flash: "mimo-v2.6-flash";
|
|
23
|
+
readonly MimoV26Pro: "mimo-v2.6-pro";
|
|
14
24
|
};
|
|
15
25
|
export type ResponsesModelIds = (typeof ResponsesModelIds)[keyof typeof ResponsesModelIds];
|
|
@@ -7,12 +7,22 @@ exports.ResponsesModelIds = void 0;
|
|
|
7
7
|
*
|
|
8
8
|
* - **`sarvam-105b`** — Sarvam flagship model.
|
|
9
9
|
* - **`glm5.3`** — 1,048,576-token context; reasoning in `output` as a `reasoning` item; flat function tools; max request size 10,485,760 bytes.
|
|
10
|
-
* - **`
|
|
11
|
-
* - **`
|
|
10
|
+
* - **`glm5.3-flash`** — long context, vision (inline base64 images), tools, and reasoning; `reasoning.effort` accepts `low` or `high` only, as on `glm5.3`.
|
|
11
|
+
* - **`gemma4`** — 262,144-token context, vision (inline base64 images), tools, and optional reasoning (`reasoning.effort` `low` or `high`).
|
|
12
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — long context, tools, and reasoning.
|
|
13
|
+
* - **`deepseekv4-pro`** (beta) — long context, text input, tools, and reasoning (default `high`).
|
|
14
|
+
* - **`kimi-k3`** (beta) — long context, image input (inline base64; no video on this route), tools, and reasoning (always on).
|
|
15
|
+
* - **`mimo-v2.6-flash`** (beta) — long context, image and audio input (inline base64; no video on this route), tools, and reasoning (on by default).
|
|
16
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
12
17
|
*/
|
|
13
18
|
exports.ResponsesModelIds = {
|
|
14
19
|
Sarvam105B: "sarvam-105b",
|
|
15
20
|
Glm53: "glm5.3",
|
|
21
|
+
Glm53Flash: "glm5.3-flash",
|
|
16
22
|
Gemma4: "gemma4",
|
|
17
|
-
|
|
23
|
+
Deepseekv41Flash1017: "deepseekv4.1-flash-1017",
|
|
24
|
+
Deepseekv4Pro: "deepseekv4-pro",
|
|
25
|
+
KimiK3: "kimi-k3",
|
|
26
|
+
MimoV26Flash: "mimo-v2.6-flash",
|
|
27
|
+
MimoV26Pro: "mimo-v2.6-pro",
|
|
18
28
|
};
|
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **`sarvam-105b`** — Sarvam flagship chat model.
|
|
5
5
|
* - **`glm5.3`** — 1,048,576-token context window; visible reasoning in `reasoning_content` (billed as completion tokens); tool calling; max request size 10,485,760 bytes; `n` must be `1`.
|
|
6
|
-
* - **`
|
|
7
|
-
* - **`
|
|
6
|
+
* - **`glm5.3-flash`** — 1,048,576-token context window, image input (inline base64), tool calling, and reasoning (on by default).
|
|
7
|
+
* - **`gemma4`** — 262,144-token context window, image input (inline base64), tool calling, and optional reasoning (`reasoning_effort`).
|
|
8
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — 1,048,576-token context window, tool calling, and reasoning.
|
|
9
|
+
* - **`deepseekv4-pro`** (beta) — 1,000,000-token context window; text input only; tool calling; reasoning (default `high`; `none` turns it off).
|
|
10
|
+
* - **`kimi-k3`** (beta) — 1,048,576-token context window; image input and short video clips (inline base64); tool calling; reasoning is always on (default `max`).
|
|
11
|
+
* - **`mimo-v2.6-flash`** (beta) — 1,048,576-token context window; image, audio, and video input (inline base64); tool calling; reasoning on by default (`none` turns it off).
|
|
12
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
8
13
|
*/
|
|
9
14
|
export declare const V2ModelIds: {
|
|
10
15
|
readonly Sarvam105B: "sarvam-105b";
|
|
11
16
|
readonly Glm53: "glm5.3";
|
|
17
|
+
readonly Glm53Flash: "glm5.3-flash";
|
|
12
18
|
readonly Gemma4: "gemma4";
|
|
13
|
-
readonly
|
|
19
|
+
readonly Deepseekv41Flash1017: "deepseekv4.1-flash-1017";
|
|
20
|
+
readonly Deepseekv4Pro: "deepseekv4-pro";
|
|
21
|
+
readonly KimiK3: "kimi-k3";
|
|
22
|
+
readonly MimoV26Flash: "mimo-v2.6-flash";
|
|
23
|
+
readonly MimoV26Pro: "mimo-v2.6-pro";
|
|
14
24
|
};
|
|
15
25
|
export type V2ModelIds = (typeof V2ModelIds)[keyof typeof V2ModelIds];
|
|
@@ -7,12 +7,22 @@ exports.V2ModelIds = void 0;
|
|
|
7
7
|
*
|
|
8
8
|
* - **`sarvam-105b`** — Sarvam flagship chat model.
|
|
9
9
|
* - **`glm5.3`** — 1,048,576-token context window; visible reasoning in `reasoning_content` (billed as completion tokens); tool calling; max request size 10,485,760 bytes; `n` must be `1`.
|
|
10
|
-
* - **`
|
|
11
|
-
* - **`
|
|
10
|
+
* - **`glm5.3-flash`** — 1,048,576-token context window, image input (inline base64), tool calling, and reasoning (on by default).
|
|
11
|
+
* - **`gemma4`** — 262,144-token context window, image input (inline base64), tool calling, and optional reasoning (`reasoning_effort`).
|
|
12
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — 1,048,576-token context window, tool calling, and reasoning.
|
|
13
|
+
* - **`deepseekv4-pro`** (beta) — 1,000,000-token context window; text input only; tool calling; reasoning (default `high`; `none` turns it off).
|
|
14
|
+
* - **`kimi-k3`** (beta) — 1,048,576-token context window; image input and short video clips (inline base64); tool calling; reasoning is always on (default `max`).
|
|
15
|
+
* - **`mimo-v2.6-flash`** (beta) — 1,048,576-token context window; image, audio, and video input (inline base64); tool calling; reasoning on by default (`none` turns it off).
|
|
16
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
12
17
|
*/
|
|
13
18
|
exports.V2ModelIds = {
|
|
14
19
|
Sarvam105B: "sarvam-105b",
|
|
15
20
|
Glm53: "glm5.3",
|
|
21
|
+
Glm53Flash: "glm5.3-flash",
|
|
16
22
|
Gemma4: "gemma4",
|
|
17
|
-
|
|
23
|
+
Deepseekv41Flash1017: "deepseekv4.1-flash-1017",
|
|
24
|
+
Deepseekv4Pro: "deepseekv4-pro",
|
|
25
|
+
KimiK3: "kimi-k3",
|
|
26
|
+
MimoV26Flash: "mimo-v2.6-flash",
|
|
27
|
+
MimoV26Pro: "mimo-v2.6-pro",
|
|
18
28
|
};
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.14";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "sarvamai",
|
|
9
|
-
"X-Fern-SDK-Version": "1.1.
|
|
10
|
-
"User-Agent": "sarvamai/1.1.
|
|
9
|
+
"X-Fern-SDK-Version": "1.1.14",
|
|
10
|
+
"User-Agent": "sarvamai/1.1.14",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -20,14 +20,14 @@ export interface CreateChatCompletionV2Request {
|
|
|
20
20
|
temperature?: number;
|
|
21
21
|
/** Nucleus sampling: greater than `0` and at most `1`. On `glm5.3`, `top_p: 0` is rejected. Prefer changing either `top_p` or `temperature`, not both. */
|
|
22
22
|
top_p?: number;
|
|
23
|
-
/** On reasoning models (`glm5.3`, `deepseekv4.1-flash`): **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**
|
|
23
|
+
/** On reasoning models (`glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`): **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**, except **`high`** on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`, and no reasoning on `gemma4`. **`none`** turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; on `mimo-v2.6-*`, any other value only switches thinking on. `kimi-k3` always thinks. Trace in `message.reasoning_content`; billed as completion tokens and counts toward `max_tokens`. On `gemma4`, reasoning is off unless this is set (`low`, `high`, or `max`). */
|
|
24
24
|
reasoning_effort?: SarvamAI.ReasoningEffort;
|
|
25
25
|
/** Maximum tokens to generate in the completion, including reasoning tokens on reasoning models. Default `2048`. Set explicitly when you need longer answers — a low limit can yield `finish_reason: "length"` with little or no visible `content` if reasoning consumes the budget. */
|
|
26
26
|
max_tokens?: number;
|
|
27
27
|
/** Optional. Default `false` — omit or `false` for one JSON response. If `true`, the response is streamed as server-sent events and ends with a `[DONE]` line. Use `stream_options.include_usage: true` to receive a final usage chunk (including `reasoning_tokens`). That chunk has an empty `choices` array — do not assume `choices[0]` is present on every event. */
|
|
28
28
|
stream?: boolean;
|
|
29
29
|
stop?: SarvamAI.StopConfiguration;
|
|
30
|
-
/** Number of chat completion choices to generate per request. You are billed for tokens across all choices. Default `1`. On `glm5.3`, only `n: 1` is accepted; higher values return `400 invalid_request_error`. */
|
|
30
|
+
/** Number of chat completion choices to generate per request. You are billed for tokens across all choices. Default `1`. On `glm5.3`, only `n: 1` is accepted; higher values return `400 invalid_request_error`. `n` > 1 needs `temperature` greater than `0` on every model; `temperature: 0` returns `400`. */
|
|
31
31
|
n?: number;
|
|
32
32
|
/** Optional integer seed for OpenAI SDK compatibility. */
|
|
33
33
|
seed?: number;
|
|
@@ -53,16 +53,14 @@ export interface CreateChatCompletionV2Request {
|
|
|
53
53
|
extra_body?: Record<string, unknown>;
|
|
54
54
|
/** Top-k sampling. Omit or set to `-1` to disable. Values `>= 1` enable top-k; `0` is rejected. There is no documented upper bound. */
|
|
55
55
|
top_k?: number;
|
|
56
|
-
/** Minimum probability mass. Must be between 0 and 1 inclusive. Outside that range is `400`. */
|
|
57
|
-
min_p?: number;
|
|
58
56
|
/** Repetition penalty. Must be greater than 0 and at most 2. `0` and values above 2 are `400`. */
|
|
59
57
|
repetition_penalty?: number;
|
|
60
|
-
/** **`false`**
|
|
58
|
+
/** **`false`** limits a turn to a single tool call on every model. */
|
|
61
59
|
parallel_tool_calls?: boolean;
|
|
62
60
|
/** Only valid with `stream: true` (otherwise `400`). Must be a top-level field, not inside `extra_body`. Use `{"include_usage": true}` to receive token usage in the final SSE chunk. */
|
|
63
61
|
stream_options?: SarvamAI.ChatStreamOptions;
|
|
64
|
-
/** If `true`, return log probabilities for output tokens (use with `top_logprobs`). Supported on **`sarvam-105b
|
|
62
|
+
/** If `true`, return log probabilities for output tokens (use with `top_logprobs`). Supported on **`sarvam-105b`**, **`gemma4`**, **`glm5.3-flash`**, **`deepseekv4.1-flash-1017`**, **`deepseekv4-pro`**, **`kimi-k3`**, **`mimo-v2.6-flash`**, and **`mimo-v2.6-pro`**. Not supported on **`glm5.3`** (`400` if enabled). */
|
|
65
63
|
logprobs?: boolean;
|
|
66
|
-
/** How many top token log probabilities to return at each position when `logprobs` is `true
|
|
64
|
+
/** How many top token log probabilities to return at each position. Takes effect only when `logprobs` is `true`; without it, some models ignore the field and others return **`400`**. Same model support as `logprobs`: works on `sarvam-105b`, `gemma4`, `glm5.3-flash`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; on `glm5.3`, omit entirely — do not send `0`, since many SDKs add it by default. */
|
|
67
65
|
top_logprobs?: number;
|
|
68
66
|
}
|
|
@@ -8,7 +8,7 @@ export interface DocAiParseRequest {
|
|
|
8
8
|
file?: core.file.Uploadable[] | undefined;
|
|
9
9
|
/** Comma-separated upload IDs returned by `POST /doc-ai/v1/job/upload`. Exactly one of `file` and `upload_ids` must be provided. */
|
|
10
10
|
upload_ids?: string;
|
|
11
|
-
/** Language of the document in BCP-47 format (e.g. `hi-IN`, `en-IN`). Defaults to Indic: when omitted, the document is processed as an Indic-language document. To process an English document, set `language` to `en-IN`. Sarvam Vision supports 22 Indian languages plus English; see the [Sarvam Vision model page](/api/
|
|
11
|
+
/** Language of the document in BCP-47 format (e.g. `hi-IN`, `en-IN`). Defaults to Indic: when omitted, the document is processed as an Indic-language document. To process an English document, set `language` to `en-IN`. Sarvam Vision supports 22 Indian languages plus English; see the [Sarvam Vision model page](/api/api-guides-tutorials/models/sarvam-vision) for the full list. */
|
|
12
12
|
language?: string;
|
|
13
13
|
/** Nature of the document content. */
|
|
14
14
|
content_type?: DocAiParseRequest.ContentType;
|
|
@@ -17,7 +17,7 @@ export interface CreateDubbingJobRequest {
|
|
|
17
17
|
src_lang: SarvamAI.DubbingLanguage;
|
|
18
18
|
/** One or more target languages to dub into. A single job dubs into all of them. */
|
|
19
19
|
target_langs: SarvamAI.DubbingLanguage[];
|
|
20
|
-
/** Which formats to auto-produce per target language. When provided, only the listed formats are auto-exported.
|
|
20
|
+
/** Which formats to auto-produce per target language. When provided, only the listed formats are auto-exported. Accepted values: `video` (dubbed MP4), `audio` (dubbed voice over the background, `.wav`), `audio_vocals` (dubbed voice alone, `.wav`), `srt` and `vtt` (subtitles of the dubbed text). When omitted, only the dubbed video (MP4) is produced; request audio and subtitles explicitly. Audio-only sources cannot produce a video, so `video` resolves to `audio` for them. */
|
|
21
21
|
export_options?: SarvamAI.DubbingExportOption[];
|
|
22
22
|
/** Clone the original speaker's voice. Set `false` to use a preset `voice_id` instead. */
|
|
23
23
|
voice_cloning?: boolean;
|
|
@@ -19,7 +19,7 @@ export interface ResponsesCreateRequest {
|
|
|
19
19
|
tools?: SarvamAI.ResponseFunctionTool[];
|
|
20
20
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
21
21
|
tool_choice?: ResponsesCreateRequest.ToolChoice;
|
|
22
|
-
/** Optional reasoning config for `glm5.3`
|
|
22
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
23
23
|
reasoning?: SarvamAI.ResponseReasoning;
|
|
24
24
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
25
25
|
extra_body?: Record<string, unknown>;
|
|
@@ -27,15 +27,15 @@ export interface ResponsesCreateRequest {
|
|
|
27
27
|
instructions?: string;
|
|
28
28
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
29
29
|
top_p?: number;
|
|
30
|
-
/**
|
|
30
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
31
31
|
top_k?: number;
|
|
32
32
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
33
33
|
frequency_penalty?: number;
|
|
34
34
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
35
35
|
presence_penalty?: number;
|
|
36
|
-
/** Output format
|
|
36
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
37
37
|
text?: SarvamAI.ResponseTextConfig;
|
|
38
|
-
/**
|
|
38
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
39
39
|
parallel_tool_calls?: boolean;
|
|
40
40
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
41
41
|
n?: number;
|
|
@@ -19,7 +19,7 @@ export interface ResponsesCreateStreamRequest {
|
|
|
19
19
|
tools?: SarvamAI.ResponseFunctionTool[];
|
|
20
20
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
21
21
|
tool_choice?: ResponsesCreateStreamRequest.ToolChoice;
|
|
22
|
-
/** Optional reasoning config for `glm5.3`
|
|
22
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
23
23
|
reasoning?: SarvamAI.ResponseReasoning;
|
|
24
24
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
25
25
|
extra_body?: Record<string, unknown>;
|
|
@@ -27,15 +27,15 @@ export interface ResponsesCreateStreamRequest {
|
|
|
27
27
|
instructions?: string;
|
|
28
28
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
29
29
|
top_p?: number;
|
|
30
|
-
/**
|
|
30
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
31
31
|
top_k?: number;
|
|
32
32
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
33
33
|
frequency_penalty?: number;
|
|
34
34
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
35
35
|
presence_penalty?: number;
|
|
36
|
-
/** Output format
|
|
36
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
37
37
|
text?: SarvamAI.ResponseTextConfig;
|
|
38
|
-
/**
|
|
38
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
39
39
|
parallel_tool_calls?: boolean;
|
|
40
40
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
41
41
|
n?: number;
|
|
@@ -92,7 +92,7 @@ export declare class VoiceCloningClient {
|
|
|
92
92
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
93
93
|
* **Auth:** send your key in the `api-subscription-key` header.
|
|
94
94
|
*
|
|
95
|
-
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g.
|
|
95
|
+
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 `TIER_LIMIT_REACHED` when the cap is hit.
|
|
96
96
|
*
|
|
97
97
|
* **Billing:** charged against the voice cloning API. See the [pricing page](https://docs.sarvam.ai/api/getting-started/pricing).
|
|
98
98
|
*
|
|
@@ -160,7 +160,7 @@ export declare class VoiceCloningClient {
|
|
|
160
160
|
getVoice(voice_id: string, requestOptions?: VoiceCloningClient.RequestOptions): core.HttpResponsePromise<SarvamAI.VoiceLibraryDetailResponse>;
|
|
161
161
|
private __getVoice;
|
|
162
162
|
/**
|
|
163
|
-
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the
|
|
163
|
+
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the Starter (pay as you go) plan (capped at 50 voices across your organization), deleting a voice frees a slot. Pro and Enterprise plans have higher limits.
|
|
164
164
|
*
|
|
165
165
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
166
166
|
* **Auth:** send your key in the `api-subscription-key` header. Returns `204 No Content` on success.
|
|
@@ -281,7 +281,7 @@ export class VoiceCloningClient {
|
|
|
281
281
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
282
282
|
* **Auth:** send your key in the `api-subscription-key` header.
|
|
283
283
|
*
|
|
284
|
-
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g.
|
|
284
|
+
* **Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 `TIER_LIMIT_REACHED` when the cap is hit.
|
|
285
285
|
*
|
|
286
286
|
* **Billing:** charged against the voice cloning API. See the [pricing page](https://docs.sarvam.ai/api/getting-started/pricing).
|
|
287
287
|
*
|
|
@@ -496,7 +496,7 @@ export class VoiceCloningClient {
|
|
|
496
496
|
});
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
|
-
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the
|
|
499
|
+
* **Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the Starter (pay as you go) plan (capped at 50 voices across your organization), deleting a voice frees a slot. Pro and Enterprise plans have higher limits.
|
|
500
500
|
*
|
|
501
501
|
* **Base URL:** `https://api.sarvam.ai`.
|
|
502
502
|
* **Auth:** send your key in the `api-subscription-key` header. Returns `204 No Content` on success.
|
|
@@ -9,7 +9,7 @@ export interface Choice {
|
|
|
9
9
|
finish_reason: SarvamAI.FinishReason;
|
|
10
10
|
/** The index of the choice in the list of choices. */
|
|
11
11
|
index: number;
|
|
12
|
-
/** Token log probabilities when supported (`sarvam-105b`, `gemma4`). Always `null` on `glm5.3
|
|
12
|
+
/** Token log probabilities when supported (`sarvam-105b`, `gemma4`, `glm5.3-flash`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`). Always `null` on `glm5.3`, which doesn't support this field. */
|
|
13
13
|
logprobs?: Record<string, unknown> | undefined;
|
|
14
14
|
message: SarvamAI.ChatCompletionResponseMessage;
|
|
15
15
|
}
|
|
@@ -12,6 +12,6 @@ export interface CreateDubbingJobData {
|
|
|
12
12
|
voice_cloning: boolean;
|
|
13
13
|
voice_id?: string | undefined;
|
|
14
14
|
pace_preset?: string | undefined;
|
|
15
|
-
/** Echo of the requested quality tier (`plus`/`lite`), or null when the service default was used. */
|
|
15
|
+
/** Echo of the requested quality tier (`plus`/`lite`/`auto`), or null when the service default was used. */
|
|
16
16
|
model_tier?: string | undefined;
|
|
17
17
|
}
|
|
@@ -14,7 +14,7 @@ export interface CreateResponseV2Request {
|
|
|
14
14
|
tools?: SarvamAI.ResponseFunctionTool[] | undefined;
|
|
15
15
|
/** Forwarded exactly as written: `none`, `auto`, `required`, `{ "type": "function", "name": "..." }`, or another object. */
|
|
16
16
|
tool_choice?: CreateResponseV2Request.ToolChoice | undefined;
|
|
17
|
-
/** Optional reasoning config for `glm5.3`
|
|
17
|
+
/** Optional reasoning config for `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`. **`effort`:** on `glm5.3` and `glm5.3-flash`, `low` or `high` only (the literal string `max` returns `400`; omitting it gives `max` on `glm5.3` and `high` on `glm5.3-flash`); on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`, `low`, `high`, or `max` all work directly. The trace is in the reasoning item's `content[0].text`; `summary` is filled only when `summary` is set. Optional **`summary`:** `auto` or `detailed`. */
|
|
18
18
|
reasoning?: SarvamAI.ResponseReasoning | undefined;
|
|
19
19
|
/** Merged into the outbound body. Must not overwrite any modelled field (`400`). `max_tool_calls` and `prompt` are `400` here and in `extra_body` — not supported by any serving deployment. */
|
|
20
20
|
extra_body?: Record<string, unknown> | undefined;
|
|
@@ -22,15 +22,15 @@ export interface CreateResponseV2Request {
|
|
|
22
22
|
instructions?: string | undefined;
|
|
23
23
|
/** Nucleus sampling. Default **`0.95`** on `glm5.3` when omitted. Must be greater than **`0`** and at most **`1`** (`0` is rejected on `glm5.3`). */
|
|
24
24
|
top_p?: number | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/** Not supported on the Responses route for `glm5.3`; any value returns **`400`**. */
|
|
26
26
|
top_k?: number | undefined;
|
|
27
27
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
28
28
|
frequency_penalty?: number | undefined;
|
|
29
29
|
/** Optional. Range `-2` to `2`. May be accepted and echoed on Responses without changing model output. */
|
|
30
30
|
presence_penalty?: number | undefined;
|
|
31
|
-
/** Output format
|
|
31
|
+
/** Output format, set in `format` (`text`, `json_object`, or `json_schema`). */
|
|
32
32
|
text?: SarvamAI.ResponseTextConfig | undefined;
|
|
33
|
-
/**
|
|
33
|
+
/** **`false`** limits a turn to a single tool call on every open-weight model. `sarvam-105b` ignores it on this route. */
|
|
34
34
|
parallel_tool_calls?: boolean | undefined;
|
|
35
35
|
/** **Ignored** on this route — Responses always returns one output. Accepted for OpenAI SDK compatibility only; omit or leave at `1`. */
|
|
36
36
|
n?: number | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Export format. `audio` is uncompressed `.wav
|
|
1
|
+
/** Export format. `video` is the dubbed MP4. `audio` is the dubbed voice over the background, as uncompressed `.wav`. `audio_vocals` is the dubbed voice alone, as `.wav`. `srt` and `vtt` are subtitles of the dubbed text. */
|
|
2
2
|
export declare const DubbingExportType: {
|
|
3
3
|
readonly Video: "video";
|
|
4
4
|
readonly Audio: "audio";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/** Export format. `audio` is uncompressed `.wav
|
|
2
|
+
/** Export format. `video` is the dubbed MP4. `audio` is the dubbed voice over the background, as uncompressed `.wav`. `audio_vocals` is the dubbed voice alone, as `.wav`. `srt` and `vtt` are subtitles of the dubbed text. */
|
|
3
3
|
export const DubbingExportType = {
|
|
4
4
|
Video: "video",
|
|
5
5
|
Audio: "audio",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Translation quality tier: `plus` (highest quality), `lite` (faster, lighter) or `auto` (balances quality and efficiency). Defaults to `auto`. */
|
|
2
2
|
export declare const DubbingModelTier: {
|
|
3
3
|
readonly Plus: "plus";
|
|
4
4
|
readonly Lite: "lite";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/**
|
|
2
|
+
/** Translation quality tier: `plus` (highest quality), `lite` (faster, lighter) or `auto` (balances quality and efficiency). Defaults to `auto`. */
|
|
3
3
|
export const DubbingModelTier = {
|
|
4
4
|
Plus: "plus",
|
|
5
5
|
Lite: "lite",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** Reasoning depth on `glm5.3`
|
|
1
|
+
/** Reasoning depth on `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`: `low`, `high`, or `max`. Default when omitted is `max` (`high` on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`; no reasoning on `gemma4`). `none` turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; other models reject it or keep thinking. */
|
|
2
2
|
export declare const ReasoningEffort: {
|
|
3
|
+
readonly None: "none";
|
|
3
4
|
readonly Low: "low";
|
|
4
5
|
readonly High: "high";
|
|
5
6
|
readonly Max: "max";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/** Reasoning depth on `glm5.3`
|
|
2
|
+
/** Reasoning depth on `glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`: `low`, `high`, or `max`. Default when omitted is `max` (`high` on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`; no reasoning on `gemma4`). `none` turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; other models reject it or keep thinking. */
|
|
3
3
|
export const ReasoningEffort = {
|
|
4
|
+
None: "none",
|
|
4
5
|
Low: "low",
|
|
5
6
|
High: "high",
|
|
6
7
|
Max: "max",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as SarvamAI from "../index.mjs";
|
|
2
2
|
export interface ResponseReasoning {
|
|
3
|
-
/** `low`, `high`, or `max`. On **`glm5.3`**
|
|
3
|
+
/** `low`, `high`, or `max`. On **`glm5.3`** and **`glm5.3-flash`**, sending the literal string `max` returns `400`; omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. **`deepseekv4.1-flash-1017`**, **`deepseekv4-pro`**, **`kimi-k3`**, **`mimo-v2.6-flash`**, and **`mimo-v2.6-pro`** accept `max` directly on this route. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting it means no reasoning. */
|
|
4
4
|
effort?: SarvamAI.ResponseReasoningEffort | undefined;
|
|
5
|
-
/** `auto` or `detailed`.
|
|
5
|
+
/** `auto` or `detailed`. Without it, the reasoning item's `summary` is empty; read the trace from `content[0].text`. */
|
|
6
6
|
summary?: ResponseReasoning.Summary | undefined;
|
|
7
7
|
/** Accepts any additional properties */
|
|
8
8
|
[key: string]: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/** Reasoning effort on the Responses route. `deepseekv4.1-flash`
|
|
1
|
+
/** Reasoning effort on the Responses route. `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro` accept all three values directly. `glm5.3` and `glm5.3-flash` accept `low` and `high`; the literal string `max` returns `400` on them. Omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting the field means no reasoning. */
|
|
2
2
|
export declare const ResponseReasoningEffort: {
|
|
3
|
+
readonly None: "none";
|
|
3
4
|
readonly Low: "low";
|
|
4
5
|
readonly High: "high";
|
|
5
6
|
readonly Max: "max";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
/** Reasoning effort on the Responses route. `deepseekv4.1-flash`
|
|
2
|
+
/** Reasoning effort on the Responses route. `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, and `mimo-v2.6-pro` accept all three values directly. `glm5.3` and `glm5.3-flash` accept `low` and `high`; the literal string `max` returns `400` on them. Omitting the field gives `max` on `glm5.3` and `high` on `glm5.3-flash`. `none` turns thinking off on `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`. `gemma4` accepts `low` or `high`; omitting the field means no reasoning. */
|
|
3
3
|
export const ResponseReasoningEffort = {
|
|
4
|
+
None: "none",
|
|
4
5
|
Low: "low",
|
|
5
6
|
High: "high",
|
|
6
7
|
Max: "max",
|
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **`sarvam-105b`** — Sarvam flagship model.
|
|
5
5
|
* - **`glm5.3`** — 1,048,576-token context; reasoning in `output` as a `reasoning` item; flat function tools; max request size 10,485,760 bytes.
|
|
6
|
-
* - **`
|
|
7
|
-
* - **`
|
|
6
|
+
* - **`glm5.3-flash`** — long context, vision (inline base64 images), tools, and reasoning; `reasoning.effort` accepts `low` or `high` only, as on `glm5.3`.
|
|
7
|
+
* - **`gemma4`** — 262,144-token context, vision (inline base64 images), tools, and optional reasoning (`reasoning.effort` `low` or `high`).
|
|
8
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — long context, tools, and reasoning.
|
|
9
|
+
* - **`deepseekv4-pro`** (beta) — long context, text input, tools, and reasoning (default `high`).
|
|
10
|
+
* - **`kimi-k3`** (beta) — long context, image input (inline base64; no video on this route), tools, and reasoning (always on).
|
|
11
|
+
* - **`mimo-v2.6-flash`** (beta) — long context, image and audio input (inline base64; no video on this route), tools, and reasoning (on by default).
|
|
12
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
8
13
|
*/
|
|
9
14
|
export declare const ResponsesModelIds: {
|
|
10
15
|
readonly Sarvam105B: "sarvam-105b";
|
|
11
16
|
readonly Glm53: "glm5.3";
|
|
17
|
+
readonly Glm53Flash: "glm5.3-flash";
|
|
12
18
|
readonly Gemma4: "gemma4";
|
|
13
|
-
readonly
|
|
19
|
+
readonly Deepseekv41Flash1017: "deepseekv4.1-flash-1017";
|
|
20
|
+
readonly Deepseekv4Pro: "deepseekv4-pro";
|
|
21
|
+
readonly KimiK3: "kimi-k3";
|
|
22
|
+
readonly MimoV26Flash: "mimo-v2.6-flash";
|
|
23
|
+
readonly MimoV26Pro: "mimo-v2.6-pro";
|
|
14
24
|
};
|
|
15
25
|
export type ResponsesModelIds = (typeof ResponsesModelIds)[keyof typeof ResponsesModelIds];
|
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
*
|
|
5
5
|
* - **`sarvam-105b`** — Sarvam flagship model.
|
|
6
6
|
* - **`glm5.3`** — 1,048,576-token context; reasoning in `output` as a `reasoning` item; flat function tools; max request size 10,485,760 bytes.
|
|
7
|
-
* - **`
|
|
8
|
-
* - **`
|
|
7
|
+
* - **`glm5.3-flash`** — long context, vision (inline base64 images), tools, and reasoning; `reasoning.effort` accepts `low` or `high` only, as on `glm5.3`.
|
|
8
|
+
* - **`gemma4`** — 262,144-token context, vision (inline base64 images), tools, and optional reasoning (`reasoning.effort` `low` or `high`).
|
|
9
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — long context, tools, and reasoning.
|
|
10
|
+
* - **`deepseekv4-pro`** (beta) — long context, text input, tools, and reasoning (default `high`).
|
|
11
|
+
* - **`kimi-k3`** (beta) — long context, image input (inline base64; no video on this route), tools, and reasoning (always on).
|
|
12
|
+
* - **`mimo-v2.6-flash`** (beta) — long context, image and audio input (inline base64; no video on this route), tools, and reasoning (on by default).
|
|
13
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
9
14
|
*/
|
|
10
15
|
export const ResponsesModelIds = {
|
|
11
16
|
Sarvam105B: "sarvam-105b",
|
|
12
17
|
Glm53: "glm5.3",
|
|
18
|
+
Glm53Flash: "glm5.3-flash",
|
|
13
19
|
Gemma4: "gemma4",
|
|
14
|
-
|
|
20
|
+
Deepseekv41Flash1017: "deepseekv4.1-flash-1017",
|
|
21
|
+
Deepseekv4Pro: "deepseekv4-pro",
|
|
22
|
+
KimiK3: "kimi-k3",
|
|
23
|
+
MimoV26Flash: "mimo-v2.6-flash",
|
|
24
|
+
MimoV26Pro: "mimo-v2.6-pro",
|
|
15
25
|
};
|
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - **`sarvam-105b`** — Sarvam flagship chat model.
|
|
5
5
|
* - **`glm5.3`** — 1,048,576-token context window; visible reasoning in `reasoning_content` (billed as completion tokens); tool calling; max request size 10,485,760 bytes; `n` must be `1`.
|
|
6
|
-
* - **`
|
|
7
|
-
* - **`
|
|
6
|
+
* - **`glm5.3-flash`** — 1,048,576-token context window, image input (inline base64), tool calling, and reasoning (on by default).
|
|
7
|
+
* - **`gemma4`** — 262,144-token context window, image input (inline base64), tool calling, and optional reasoning (`reasoning_effort`).
|
|
8
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — 1,048,576-token context window, tool calling, and reasoning.
|
|
9
|
+
* - **`deepseekv4-pro`** (beta) — 1,000,000-token context window; text input only; tool calling; reasoning (default `high`; `none` turns it off).
|
|
10
|
+
* - **`kimi-k3`** (beta) — 1,048,576-token context window; image input and short video clips (inline base64); tool calling; reasoning is always on (default `max`).
|
|
11
|
+
* - **`mimo-v2.6-flash`** (beta) — 1,048,576-token context window; image, audio, and video input (inline base64); tool calling; reasoning on by default (`none` turns it off).
|
|
12
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
8
13
|
*/
|
|
9
14
|
export declare const V2ModelIds: {
|
|
10
15
|
readonly Sarvam105B: "sarvam-105b";
|
|
11
16
|
readonly Glm53: "glm5.3";
|
|
17
|
+
readonly Glm53Flash: "glm5.3-flash";
|
|
12
18
|
readonly Gemma4: "gemma4";
|
|
13
|
-
readonly
|
|
19
|
+
readonly Deepseekv41Flash1017: "deepseekv4.1-flash-1017";
|
|
20
|
+
readonly Deepseekv4Pro: "deepseekv4-pro";
|
|
21
|
+
readonly KimiK3: "kimi-k3";
|
|
22
|
+
readonly MimoV26Flash: "mimo-v2.6-flash";
|
|
23
|
+
readonly MimoV26Pro: "mimo-v2.6-pro";
|
|
14
24
|
};
|
|
15
25
|
export type V2ModelIds = (typeof V2ModelIds)[keyof typeof V2ModelIds];
|
|
@@ -4,12 +4,22 @@
|
|
|
4
4
|
*
|
|
5
5
|
* - **`sarvam-105b`** — Sarvam flagship chat model.
|
|
6
6
|
* - **`glm5.3`** — 1,048,576-token context window; visible reasoning in `reasoning_content` (billed as completion tokens); tool calling; max request size 10,485,760 bytes; `n` must be `1`.
|
|
7
|
-
* - **`
|
|
8
|
-
* - **`
|
|
7
|
+
* - **`glm5.3-flash`** — 1,048,576-token context window, image input (inline base64), tool calling, and reasoning (on by default).
|
|
8
|
+
* - **`gemma4`** — 262,144-token context window, image input (inline base64), tool calling, and optional reasoning (`reasoning_effort`).
|
|
9
|
+
* - **`deepseekv4.1-flash-1017`** (beta) — 1,048,576-token context window, tool calling, and reasoning.
|
|
10
|
+
* - **`deepseekv4-pro`** (beta) — 1,000,000-token context window; text input only; tool calling; reasoning (default `high`; `none` turns it off).
|
|
11
|
+
* - **`kimi-k3`** (beta) — 1,048,576-token context window; image input and short video clips (inline base64); tool calling; reasoning is always on (default `max`).
|
|
12
|
+
* - **`mimo-v2.6-flash`** (beta) — 1,048,576-token context window; image, audio, and video input (inline base64); tool calling; reasoning on by default (`none` turns it off).
|
|
13
|
+
* - **`mimo-v2.6-pro`** (beta) — same contract as `mimo-v2.6-flash`.
|
|
9
14
|
*/
|
|
10
15
|
export const V2ModelIds = {
|
|
11
16
|
Sarvam105B: "sarvam-105b",
|
|
12
17
|
Glm53: "glm5.3",
|
|
18
|
+
Glm53Flash: "glm5.3-flash",
|
|
13
19
|
Gemma4: "gemma4",
|
|
14
|
-
|
|
20
|
+
Deepseekv41Flash1017: "deepseekv4.1-flash-1017",
|
|
21
|
+
Deepseekv4Pro: "deepseekv4-pro",
|
|
22
|
+
KimiK3: "kimi-k3",
|
|
23
|
+
MimoV26Flash: "mimo-v2.6-flash",
|
|
24
|
+
MimoV26Pro: "mimo-v2.6-pro",
|
|
15
25
|
};
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1.14";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.1.
|
|
1
|
+
export const SDK_VERSION = "1.1.14";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1425,7 +1425,7 @@ Accepts `multipart/form-data` - send the audio as the `file` upload and everythi
|
|
|
1425
1425
|
**Base URL:** `https://api.sarvam.ai`.
|
|
1426
1426
|
**Auth:** send your key in the `api-subscription-key` header.
|
|
1427
1427
|
|
|
1428
|
-
**Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g.
|
|
1428
|
+
**Limits:** max file size 50 MB. Voice count is capped by your subscription tier (e.g. 50 voices on the starter tier, counted across your organization) - the API returns 403 `TIER_LIMIT_REACHED` when the cap is hit.
|
|
1429
1429
|
|
|
1430
1430
|
**Billing:** charged against the voice cloning API. See the [pricing page](https://docs.sarvam.ai/api/getting-started/pricing).
|
|
1431
1431
|
</dd>
|
|
@@ -1632,7 +1632,7 @@ await client.voiceCloning.getVoice("voice_id");
|
|
|
1632
1632
|
<dl>
|
|
1633
1633
|
<dd>
|
|
1634
1634
|
|
|
1635
|
-
**Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the
|
|
1635
|
+
**Beta.** Deletes a cloned voice: its audio assets are removed and the voice is no longer listed or usable for synthesis. On the Starter (pay as you go) plan (capped at 50 voices across your organization), deleting a voice frees a slot. Pro and Enterprise plans have higher limits.
|
|
1636
1636
|
|
|
1637
1637
|
**Base URL:** `https://api.sarvam.ai`.
|
|
1638
1638
|
**Auth:** send your key in the `api-subscription-key` header. Returns `204 No Content` on success.
|
|
@@ -2101,7 +2101,7 @@ Requires `api-subscription-key`.
|
|
|
2101
2101
|
|
|
2102
2102
|
**Streaming is optional.** Default is one JSON response (`stream` omitted or `false`). Set `stream: true` for server-sent events; the stream ends with a `[DONE]` line.
|
|
2103
2103
|
|
|
2104
|
-
**Reasoning (`glm5.3`, `deepseekv4.1-flash`):** set `reasoning_effort` to **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**
|
|
2104
|
+
**Reasoning (`glm5.3`, `glm5.3-flash`, `gemma4`, `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro`):** set `reasoning_effort` to **`low`**, **`high`**, or **`max`**. Default when omitted is **`max`**, except **`high`** on `glm5.3-flash`, `deepseekv4.1-flash-1017`, and `deepseekv4-pro`, and no reasoning on `gemma4`. **`none`** turns thinking off on `deepseekv4.1-flash-1017`, `deepseekv4-pro`, `mimo-v2.6-flash`, and `mimo-v2.6-pro`; on `mimo-v2.6-*`, any other value only switches thinking on. `kimi-k3` always thinks. The trace is in `choices[].message.reasoning_content` and counts toward `max_tokens`. `gemma4` reasons only when `reasoning_effort` is set.
|
|
2105
2105
|
|
|
2106
2106
|
Request fields documented on this operation are validated by the API. Other OpenAI-compatible fields may be forwarded to the model when sent.
|
|
2107
2107
|
|
|
@@ -3876,13 +3876,13 @@ await client.docAi.getCapabilities();
|
|
|
3876
3876
|
|
|
3877
3877
|
Generate a model reply in the OpenAI Responses format.
|
|
3878
3878
|
|
|
3879
|
-
**Models:** `sarvam-105b`, `glm5.3`, `gemma4`,
|
|
3879
|
+
**Models:** `sarvam-105b`, `glm5.3`, `gemma4`, `deepseekv4.1-flash-1017`, `glm5.3-flash`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro` (ids are case-sensitive).
|
|
3880
3880
|
|
|
3881
3881
|
**Each call is independent.** Send the full conversation in `input` every time — nothing is stored for you. Leave out `store` or set it to `false` (`true` returns **`400`**). You cannot load a past response by id (`GET /v2/responses/{id}` is always **`404`**).
|
|
3882
3882
|
|
|
3883
3883
|
**Streaming is optional.** Default is a single JSON body (`stream` omitted or `false`). Set `stream: true` only if you want server-sent events.
|
|
3884
3884
|
|
|
3885
|
-
**Reasoning (`glm5.3`, `deepseekv4.1-flash`):** both support `low`, `high`, and `max`. On `glm5.3`, `reasoning.effort` only accepts **`low`** or **`high`** — omit `reasoning` / `effort` for **`max`**-level reasoning, since sending the literal string **`"max"`** returns **`400`**. On `deepseekv4.1-flash`, all three values including `max` work directly.
|
|
3885
|
+
**Reasoning (`glm5.3`, `deepseekv4.1-flash-1017`):** both support `low`, `high`, and `max`. On `glm5.3`, `reasoning.effort` only accepts **`low`** or **`high`** — omit `reasoning` / `effort` for **`max`**-level reasoning, since sending the literal string **`"max"`** returns **`400`**. On `deepseekv4.1-flash-1017`, all three values including `max` work directly. Read the trace from the reasoning item's `content[0].text`; `summary` is filled only when `reasoning.summary` is set. Reasoning tokens count toward `max_output_tokens`, which has no default cap — omitting it means unbounded generation.
|
|
3886
3886
|
|
|
3887
3887
|
Other fields are documented below. See the [Responses API guide](/api/api-guides-tutorials/chat-completion/responses-api).
|
|
3888
3888
|
</dd>
|
|
@@ -3955,13 +3955,13 @@ for await (const item of response) {
|
|
|
3955
3955
|
|
|
3956
3956
|
Generate a model reply in the OpenAI Responses format.
|
|
3957
3957
|
|
|
3958
|
-
**Models:** `sarvam-105b`, `glm5.3`, `gemma4`,
|
|
3958
|
+
**Models:** `sarvam-105b`, `glm5.3`, `gemma4`, `deepseekv4.1-flash-1017`, `glm5.3-flash`, `deepseekv4-pro`, `kimi-k3`, `mimo-v2.6-flash`, `mimo-v2.6-pro` (ids are case-sensitive).
|
|
3959
3959
|
|
|
3960
3960
|
**Each call is independent.** Send the full conversation in `input` every time — nothing is stored for you. Leave out `store` or set it to `false` (`true` returns **`400`**). You cannot load a past response by id (`GET /v2/responses/{id}` is always **`404`**).
|
|
3961
3961
|
|
|
3962
3962
|
**Streaming is optional.** Default is a single JSON body (`stream` omitted or `false`). Set `stream: true` only if you want server-sent events.
|
|
3963
3963
|
|
|
3964
|
-
**Reasoning (`glm5.3`, `deepseekv4.1-flash`):** both support `low`, `high`, and `max`. On `glm5.3`, `reasoning.effort` only accepts **`low`** or **`high`** — omit `reasoning` / `effort` for **`max`**-level reasoning, since sending the literal string **`"max"`** returns **`400`**. On `deepseekv4.1-flash`, all three values including `max` work directly.
|
|
3964
|
+
**Reasoning (`glm5.3`, `deepseekv4.1-flash-1017`):** both support `low`, `high`, and `max`. On `glm5.3`, `reasoning.effort` only accepts **`low`** or **`high`** — omit `reasoning` / `effort` for **`max`**-level reasoning, since sending the literal string **`"max"`** returns **`400`**. On `deepseekv4.1-flash-1017`, all three values including `max` work directly. Read the trace from the reasoning item's `content[0].text`; `summary` is filled only when `reasoning.summary` is set. Reasoning tokens count toward `max_output_tokens`, which has no default cap — omitting it means unbounded generation.
|
|
3965
3965
|
|
|
3966
3966
|
Other fields are documented below. See the [Responses API guide](/api/api-guides-tutorials/chat-completion/responses-api).
|
|
3967
3967
|
</dd>
|