@openrouter/sdk 1.3.28 → 1.3.30
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/README.md +1 -1
- package/esm/funcs/batchCreateBatches.d.ts +19 -0
- package/esm/funcs/batchCreateBatches.js +98 -0
- package/esm/funcs/batchDelete.d.ts +19 -0
- package/esm/funcs/batchDelete.js +103 -0
- package/esm/funcs/batchGetBatches.d.ts +19 -0
- package/esm/funcs/batchGetBatches.js +103 -0
- package/esm/funcs/batchList.d.ts +21 -0
- package/esm/funcs/batchList.js +134 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/anthropicadvisortoolresult.d.ts +14 -0
- package/esm/models/anthropicadvisortoolresult.js +21 -0
- package/esm/models/anthropicbase64pdfsource.d.ts +17 -2
- package/esm/models/anthropicbase64pdfsource.js +25 -2
- package/esm/models/anthropicbashcodeexecutioncontent.d.ts +11 -0
- package/esm/models/anthropicbashcodeexecutioncontent.js +17 -0
- package/esm/models/anthropicbashcodeexecutionoutput.d.ts +18 -0
- package/esm/models/anthropicbashcodeexecutionoutput.js +25 -0
- package/esm/models/anthropicbashcodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropicbashcodeexecutionresult.js +24 -0
- package/esm/models/anthropicbashcodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropicbashcodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropicbashcodeexecutiontoolresulterror.d.ts +22 -0
- package/esm/models/anthropicbashcodeexecutiontoolresulterror.js +30 -0
- package/esm/models/anthropiccaller.d.ts +12 -0
- package/esm/models/anthropiccaller.js +19 -0
- package/esm/models/anthropiccitationcharlocation.d.ts +16 -0
- package/esm/models/anthropiccitationcharlocation.js +30 -0
- package/esm/models/anthropiccitationcontentblocklocation.d.ts +16 -0
- package/esm/models/anthropiccitationcontentblocklocation.js +30 -0
- package/esm/models/anthropiccitationpagelocation.d.ts +16 -0
- package/esm/models/anthropiccitationpagelocation.js +30 -0
- package/esm/models/anthropiccitationsconfig.d.ts +10 -0
- package/esm/models/anthropiccitationsconfig.js +14 -0
- package/esm/models/anthropiccitationsearchresultlocation.d.ts +16 -0
- package/esm/models/anthropiccitationsearchresultlocation.js +28 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.d.ts +14 -0
- package/esm/models/anthropiccitationwebsearchresultlocation.js +24 -0
- package/esm/models/anthropiccodeexecution20250825caller.d.ts +11 -0
- package/esm/models/anthropiccodeexecution20250825caller.js +20 -0
- package/esm/models/anthropiccodeexecution20260120caller.d.ts +11 -0
- package/esm/models/anthropiccodeexecution20260120caller.js +20 -0
- package/esm/models/anthropiccodeexecutioncontent.d.ts +12 -0
- package/esm/models/anthropiccodeexecutioncontent.js +19 -0
- package/esm/models/anthropiccodeexecutionoutput.d.ts +18 -0
- package/esm/models/anthropiccodeexecutionoutput.js +25 -0
- package/esm/models/anthropiccodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropiccodeexecutionresult.js +24 -0
- package/esm/models/anthropiccodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropiccodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropiccodeexecutiontoolresulterror.d.ts +12 -0
- package/esm/models/anthropiccodeexecutiontoolresulterror.js +21 -0
- package/esm/models/anthropiccompactionblock.d.ts +12 -0
- package/esm/models/anthropiccompactionblock.js +21 -0
- package/esm/models/anthropiccontainer.d.ts +13 -0
- package/esm/models/anthropiccontainer.js +22 -0
- package/esm/models/anthropiccontainerskill.d.ts +20 -0
- package/esm/models/anthropiccontainerskill.js +28 -0
- package/esm/models/anthropiccontainerupload.d.ts +11 -0
- package/esm/models/anthropiccontainerupload.js +20 -0
- package/esm/models/anthropicdirectcaller.d.ts +10 -0
- package/esm/models/anthropicdirectcaller.js +14 -0
- package/esm/models/anthropicdocumentblock.d.ts +36 -0
- package/esm/models/anthropicdocumentblock.js +45 -0
- package/esm/models/anthropicdocumentblockparam.d.ts +20 -4
- package/esm/models/anthropicdocumentblockparam.js +4 -4
- package/esm/models/anthropicencryptedcodeexecutionresult.d.ts +15 -0
- package/esm/models/anthropicencryptedcodeexecutionresult.js +25 -0
- package/esm/models/anthropicinputtransformation.d.ts +18 -0
- package/esm/models/anthropicinputtransformation.js +16 -0
- package/esm/models/anthropicoutputtokensdetails.d.ts +10 -0
- package/esm/models/anthropicoutputtokensdetails.js +19 -0
- package/esm/models/anthropicplaintextsource.d.ts +17 -2
- package/esm/models/anthropicplaintextsource.js +25 -2
- package/esm/models/anthropicredactedthinkingblock.d.ts +11 -0
- package/esm/models/anthropicredactedthinkingblock.js +15 -0
- package/esm/models/anthropicrefusalstopdetails.d.ts +32 -0
- package/esm/models/anthropicrefusalstopdetails.js +31 -0
- package/esm/models/anthropicservertoolerrorcode.d.ts +12 -0
- package/esm/models/anthropicservertoolerrorcode.js +14 -0
- package/esm/models/anthropicservertoolusage.d.ts +11 -0
- package/esm/models/anthropicservertoolusage.js +21 -0
- package/esm/models/anthropicservicetier.d.ts +11 -0
- package/esm/models/anthropicservicetier.js +13 -0
- package/esm/models/anthropictextblock.d.ts +13 -0
- package/esm/models/anthropictextblock.js +17 -0
- package/esm/models/anthropictextcitation.d.ts +14 -0
- package/esm/models/anthropictextcitation.js +23 -0
- package/esm/models/anthropictexteditorcodeexecutioncontent.d.ts +13 -0
- package/esm/models/anthropictexteditorcodeexecutioncontent.js +21 -0
- package/esm/models/anthropictexteditorcodeexecutioncreateresult.d.ts +11 -0
- package/esm/models/anthropictexteditorcodeexecutioncreateresult.js +20 -0
- package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.d.ts +15 -0
- package/esm/models/anthropictexteditorcodeexecutionstrreplaceresult.js +28 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresult.d.ts +13 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresult.js +22 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.d.ts +23 -0
- package/esm/models/anthropictexteditorcodeexecutiontoolresulterror.js +33 -0
- package/esm/models/anthropictexteditorcodeexecutionviewresult.d.ts +24 -0
- package/esm/models/anthropictexteditorcodeexecutionviewresult.js +36 -0
- package/esm/models/anthropicthinkingblock.d.ts +12 -0
- package/esm/models/anthropicthinkingblock.js +16 -0
- package/esm/models/anthropictoolreference.d.ts +18 -0
- package/esm/models/anthropictoolreference.js +25 -0
- package/esm/models/anthropictoolsearchcontent.d.ts +11 -0
- package/esm/models/anthropictoolsearchcontent.js +17 -0
- package/esm/models/anthropictoolsearchresult.d.ts +12 -0
- package/esm/models/anthropictoolsearchresult.js +21 -0
- package/esm/models/anthropictoolsearchresulterror.d.ts +13 -0
- package/esm/models/anthropictoolsearchresulterror.js +23 -0
- package/esm/models/anthropictoolsearchtoolresult.d.ts +13 -0
- package/esm/models/anthropictoolsearchtoolresult.js +22 -0
- package/esm/models/anthropictooluseblock.d.ts +15 -0
- package/esm/models/anthropictooluseblock.js +19 -0
- package/esm/models/anthropicwebfetchblock.d.ts +14 -0
- package/esm/models/anthropicwebfetchblock.js +23 -0
- package/esm/models/anthropicwebfetchcontent.d.ts +11 -0
- package/esm/models/anthropicwebfetchcontent.js +17 -0
- package/esm/models/anthropicwebfetchtoolresult.d.ts +15 -0
- package/esm/models/anthropicwebfetchtoolresult.js +24 -0
- package/esm/models/anthropicwebfetchtoolresulterror.d.ts +25 -0
- package/esm/models/anthropicwebfetchtoolresulterror.js +33 -0
- package/esm/models/anthropicwebsearchresult.d.ts +21 -0
- package/esm/models/anthropicwebsearchresult.js +29 -0
- package/esm/models/anthropicwebsearchtoolresult.d.ts +20 -0
- package/esm/models/anthropicwebsearchtoolresult.js +36 -0
- package/esm/models/anthropicwebsearchtoolresulterror.d.ts +29 -0
- package/esm/models/anthropicwebsearchtoolresulterror.js +37 -0
- package/esm/models/batchdeletedobject.d.ts +26 -0
- package/esm/models/batchdeletedobject.js +22 -0
- package/esm/models/batchdeletionoutcome.d.ts +17 -0
- package/esm/models/batchdeletionoutcome.js +16 -0
- package/esm/models/batchdeletiontargets.d.ts +50 -0
- package/esm/models/batchdeletiontargets.js +32 -0
- package/esm/models/batcherrorresponse.d.ts +11 -0
- package/esm/models/batcherrorresponse.js +15 -0
- package/esm/models/batchlistitem.d.ts +181 -0
- package/esm/models/batchlistitem.js +159 -0
- package/esm/models/batchlistresponse.d.ts +25 -0
- package/esm/models/batchlistresponse.js +31 -0
- package/esm/models/batchliststatus.d.ts +20 -0
- package/esm/models/batchliststatus.js +19 -0
- package/esm/models/batchlisttimestamp.d.ts +12 -0
- package/esm/models/batchlisttimestamp.js +15 -0
- package/esm/models/batchobject.d.ts +750 -0
- package/esm/models/batchobject.js +810 -0
- package/esm/models/batchpaymentrequiredresponseerror.d.ts +159 -0
- package/esm/models/batchpaymentrequiredresponseerror.js +136 -0
- package/esm/models/batchproviderpreferences.d.ts +25 -0
- package/esm/models/batchproviderpreferences.js +20 -0
- package/esm/models/batchsubmitbody.d.ts +62 -0
- package/esm/models/batchsubmitbody.js +51 -0
- package/esm/models/debugevent.d.ts +12 -12
- package/esm/models/debugevent.js +11 -12
- package/esm/models/errors/batcherrorresponse.d.ts +19 -0
- package/esm/models/errors/batcherrorresponse.js +32 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +53 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.js +64 -0
- package/esm/models/errors/index.d.ts +2 -0
- package/esm/models/errors/index.js +2 -0
- package/esm/models/finishreason.d.ts +13 -0
- package/esm/models/finishreason.js +15 -0
- package/esm/models/imagegenerationusage.d.ts +4 -4
- package/esm/models/imagegenerationusage.js +4 -6
- package/esm/models/index.d.ts +77 -0
- package/esm/models/index.js +77 -0
- package/esm/models/internchatchoice.d.ts +4 -4
- package/esm/models/internchatchoice.js +3 -3
- package/esm/models/messagesmessageparam.d.ts +8 -8
- package/esm/models/messagesmessageparam.js +6 -7
- package/esm/models/operations/createbatches.d.ts +59 -0
- package/esm/models/operations/createbatches.js +23 -0
- package/esm/models/operations/deletebatch.d.ts +58 -0
- package/esm/models/operations/deletebatch.js +21 -0
- package/esm/models/operations/getbatches.d.ts +58 -0
- package/esm/models/operations/getbatches.js +21 -0
- package/esm/models/operations/index.d.ts +4 -0
- package/esm/models/operations/index.js +4 -0
- package/esm/models/operations/listbatches.d.ts +87 -0
- package/esm/models/operations/listbatches.js +40 -0
- package/esm/models/oranthropicbashtoolresult.d.ts +43 -0
- package/esm/models/oranthropicbashtoolresult.js +49 -0
- package/esm/models/oranthropiccontentblock.d.ts +25 -0
- package/esm/models/oranthropiccontentblock.js +45 -0
- package/esm/models/oranthropicnullablecaller.d.ts +12 -0
- package/esm/models/oranthropicnullablecaller.js +19 -0
- package/esm/models/oranthropicservertooluseblock.d.ts +15 -0
- package/esm/models/oranthropicservertooluseblock.js +19 -0
- package/esm/models/oranthropicshelltoolresult.d.ts +43 -0
- package/esm/models/oranthropicshelltoolresult.js +50 -0
- package/esm/models/oranthropicstopreason.d.ts +16 -0
- package/esm/models/oranthropicstopreason.js +18 -0
- package/esm/models/outputfusionservertoolitem.d.ts +8 -8
- package/esm/models/outputfusionservertoolitem.js +8 -8
- package/esm/models/publicendpoint.d.ts +8 -0
- package/esm/models/publicendpoint.js +4 -0
- package/esm/models/speechinputreference.d.ts +4 -3
- package/esm/models/speechinputreference.js +2 -0
- package/esm/models/speechinputreferenceaudio.d.ts +1 -1
- package/esm/models/speechinputreferenceaudioinput.d.ts +8 -3
- package/esm/models/speechinputreferenceaudioinput.js +2 -1
- package/esm/models/speechinputreferenceimage.d.ts +21 -0
- package/esm/models/speechinputreferenceimage.js +20 -0
- package/esm/models/speechinputreferenceimageinput.d.ts +18 -0
- package/esm/models/speechinputreferenceimageinput.js +13 -0
- package/esm/models/speechinputreferencetext.d.ts +2 -2
- package/esm/models/speechrequest.d.ts +1 -1
- package/esm/models/submitgenerationfeedbackrequest.d.ts +4 -4
- package/esm/models/submitgenerationfeedbackrequest.js +3 -4
- package/esm/sdk/batch.d.ts +37 -0
- package/esm/sdk/batch.js +50 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ecf0849a25c1
|
|
4
|
+
*/
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
7
|
+
import { AnthropicCodeExecution20250825Caller$inboundSchema, } from "./anthropiccodeexecution20250825caller.js";
|
|
8
|
+
import { AnthropicCodeExecution20260120Caller$inboundSchema, } from "./anthropiccodeexecution20260120caller.js";
|
|
9
|
+
import { AnthropicDirectCaller$inboundSchema, } from "./anthropicdirectcaller.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ORAnthropicNullableCaller$inboundSchema = discriminatedUnion("type", {
|
|
12
|
+
code_execution_20250825: AnthropicCodeExecution20250825Caller$inboundSchema,
|
|
13
|
+
code_execution_20260120: AnthropicCodeExecution20260120Caller$inboundSchema,
|
|
14
|
+
direct: AnthropicDirectCaller$inboundSchema,
|
|
15
|
+
});
|
|
16
|
+
export function orAnthropicNullableCallerFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => ORAnthropicNullableCaller$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ORAnthropicNullableCaller' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=oranthropicnullablecaller.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ORAnthropicNullableCaller } from "./oranthropicnullablecaller.js";
|
|
5
|
+
export type ORAnthropicServerToolUseBlock = {
|
|
6
|
+
caller?: ORAnthropicNullableCaller | null | undefined;
|
|
7
|
+
id: string;
|
|
8
|
+
input?: any | undefined;
|
|
9
|
+
name: string;
|
|
10
|
+
type: "server_tool_use";
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ORAnthropicServerToolUseBlock$inboundSchema: z.ZodType<ORAnthropicServerToolUseBlock, unknown>;
|
|
14
|
+
export declare function orAnthropicServerToolUseBlockFromJSON(jsonString: string): SafeParseResult<ORAnthropicServerToolUseBlock, SDKValidationError>;
|
|
15
|
+
//# sourceMappingURL=oranthropicservertooluseblock.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6dab967e4db6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ORAnthropicNullableCaller$inboundSchema, } from "./oranthropicnullablecaller.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ORAnthropicServerToolUseBlock$inboundSchema = z.object({
|
|
10
|
+
caller: z.nullable(ORAnthropicNullableCaller$inboundSchema).optional(),
|
|
11
|
+
id: z.string(),
|
|
12
|
+
input: z.any().optional(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
type: z.literal("server_tool_use"),
|
|
15
|
+
});
|
|
16
|
+
export function orAnthropicServerToolUseBlockFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => ORAnthropicServerToolUseBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ORAnthropicServerToolUseBlock' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=oranthropicservertooluseblock.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const ORAnthropicShellToolResultTypeContainerFileCitation: {
|
|
6
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
7
|
+
};
|
|
8
|
+
export type ORAnthropicShellToolResultTypeContainerFileCitation = ClosedEnum<typeof ORAnthropicShellToolResultTypeContainerFileCitation>;
|
|
9
|
+
export type ORAnthropicShellToolResultFile = {
|
|
10
|
+
containerId: string;
|
|
11
|
+
endIndex: number;
|
|
12
|
+
fileId: string;
|
|
13
|
+
filename: string;
|
|
14
|
+
startIndex: number;
|
|
15
|
+
type: ORAnthropicShellToolResultTypeContainerFileCitation;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Output of an `openrouter:shell` call executed in the OpenRouter sandbox
|
|
19
|
+
*/
|
|
20
|
+
export type ORAnthropicShellToolResult = {
|
|
21
|
+
/**
|
|
22
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
23
|
+
*/
|
|
24
|
+
containerId?: string | undefined;
|
|
25
|
+
content: {
|
|
26
|
+
[k: string]: any;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
30
|
+
*/
|
|
31
|
+
files?: Array<ORAnthropicShellToolResultFile> | undefined;
|
|
32
|
+
toolUseId: string;
|
|
33
|
+
type: "openrouter_shell_tool_result";
|
|
34
|
+
};
|
|
35
|
+
/** @internal */
|
|
36
|
+
export declare const ORAnthropicShellToolResultTypeContainerFileCitation$inboundSchema: z.ZodEnum<typeof ORAnthropicShellToolResultTypeContainerFileCitation>;
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const ORAnthropicShellToolResultFile$inboundSchema: z.ZodType<ORAnthropicShellToolResultFile, unknown>;
|
|
39
|
+
export declare function orAnthropicShellToolResultFileFromJSON(jsonString: string): SafeParseResult<ORAnthropicShellToolResultFile, SDKValidationError>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const ORAnthropicShellToolResult$inboundSchema: z.ZodType<ORAnthropicShellToolResult, unknown>;
|
|
42
|
+
export declare function orAnthropicShellToolResultFromJSON(jsonString: string): SafeParseResult<ORAnthropicShellToolResult, SDKValidationError>;
|
|
43
|
+
//# sourceMappingURL=oranthropicshelltoolresult.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6c0f19243a3e
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
export const ORAnthropicShellToolResultTypeContainerFileCitation = {
|
|
9
|
+
ContainerFileCitation: "container_file_citation",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ORAnthropicShellToolResultTypeContainerFileCitation$inboundSchema = z
|
|
13
|
+
.enum(ORAnthropicShellToolResultTypeContainerFileCitation);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const ORAnthropicShellToolResultFile$inboundSchema = z.object({
|
|
16
|
+
container_id: z.string(),
|
|
17
|
+
end_index: z.int(),
|
|
18
|
+
file_id: z.string(),
|
|
19
|
+
filename: z.string(),
|
|
20
|
+
start_index: z.int(),
|
|
21
|
+
type: ORAnthropicShellToolResultTypeContainerFileCitation$inboundSchema,
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"container_id": "containerId",
|
|
25
|
+
"end_index": "endIndex",
|
|
26
|
+
"file_id": "fileId",
|
|
27
|
+
"start_index": "startIndex",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export function orAnthropicShellToolResultFileFromJSON(jsonString) {
|
|
31
|
+
return safeParse(jsonString, (x) => ORAnthropicShellToolResultFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ORAnthropicShellToolResultFile' from JSON`);
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ORAnthropicShellToolResult$inboundSchema = z.object({
|
|
35
|
+
container_id: z.string().optional(),
|
|
36
|
+
content: z.record(z.string(), z.any()),
|
|
37
|
+
files: z.array(z.lazy(() => ORAnthropicShellToolResultFile$inboundSchema))
|
|
38
|
+
.optional(),
|
|
39
|
+
tool_use_id: z.string(),
|
|
40
|
+
type: z.literal("openrouter_shell_tool_result"),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"container_id": "containerId",
|
|
44
|
+
"tool_use_id": "toolUseId",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
export function orAnthropicShellToolResultFromJSON(jsonString) {
|
|
48
|
+
return safeParse(jsonString, (x) => ORAnthropicShellToolResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ORAnthropicShellToolResult' from JSON`);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=oranthropicshelltoolresult.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const ORAnthropicStopReason: {
|
|
4
|
+
readonly EndTurn: "end_turn";
|
|
5
|
+
readonly MaxTokens: "max_tokens";
|
|
6
|
+
readonly ModelContextWindowExceeded: "model_context_window_exceeded";
|
|
7
|
+
readonly StopSequence: "stop_sequence";
|
|
8
|
+
readonly ToolUse: "tool_use";
|
|
9
|
+
readonly PauseTurn: "pause_turn";
|
|
10
|
+
readonly Refusal: "refusal";
|
|
11
|
+
readonly Compaction: "compaction";
|
|
12
|
+
};
|
|
13
|
+
export type ORAnthropicStopReason = OpenEnum<typeof ORAnthropicStopReason>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ORAnthropicStopReason$inboundSchema: z.ZodType<ORAnthropicStopReason, unknown>;
|
|
16
|
+
//# sourceMappingURL=oranthropicstopreason.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2f8990149810
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
export const ORAnthropicStopReason = {
|
|
7
|
+
EndTurn: "end_turn",
|
|
8
|
+
MaxTokens: "max_tokens",
|
|
9
|
+
ModelContextWindowExceeded: "model_context_window_exceeded",
|
|
10
|
+
StopSequence: "stop_sequence",
|
|
11
|
+
ToolUse: "tool_use",
|
|
12
|
+
PauseTurn: "pause_turn",
|
|
13
|
+
Refusal: "refusal",
|
|
14
|
+
Compaction: "compaction",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ORAnthropicStopReason$inboundSchema = openEnums.inboundSchema(ORAnthropicStopReason);
|
|
18
|
+
//# sourceMappingURL=oranthropicstopreason.js.map
|
|
@@ -19,7 +19,7 @@ export type FailedModel = {
|
|
|
19
19
|
*/
|
|
20
20
|
statusCode?: number | undefined;
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
22
|
+
export type OutputFusionServerToolItemResponse = {
|
|
23
23
|
content?: string | undefined;
|
|
24
24
|
model: string;
|
|
25
25
|
};
|
|
@@ -51,7 +51,7 @@ export type OutputFusionServerToolItem = {
|
|
|
51
51
|
/**
|
|
52
52
|
* Analysis models that produced a response in this fusion run, with each model's full panel content.
|
|
53
53
|
*/
|
|
54
|
-
responses?: Array<
|
|
54
|
+
responses?: Array<OutputFusionServerToolItemResponse> | undefined;
|
|
55
55
|
/**
|
|
56
56
|
* Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.
|
|
57
57
|
*/
|
|
@@ -72,16 +72,16 @@ export declare const FailedModel$outboundSchema: z.ZodType<FailedModel$Outbound,
|
|
|
72
72
|
export declare function failedModelToJSON(failedModel: FailedModel): string;
|
|
73
73
|
export declare function failedModelFromJSON(jsonString: string): SafeParseResult<FailedModel, SDKValidationError>;
|
|
74
74
|
/** @internal */
|
|
75
|
-
export declare const
|
|
75
|
+
export declare const OutputFusionServerToolItemResponse$inboundSchema: z.ZodType<OutputFusionServerToolItemResponse, unknown>;
|
|
76
76
|
/** @internal */
|
|
77
|
-
export type
|
|
77
|
+
export type OutputFusionServerToolItemResponse$Outbound = {
|
|
78
78
|
content?: string | undefined;
|
|
79
79
|
model: string;
|
|
80
80
|
};
|
|
81
81
|
/** @internal */
|
|
82
|
-
export declare const
|
|
83
|
-
export declare function
|
|
84
|
-
export declare function
|
|
82
|
+
export declare const OutputFusionServerToolItemResponse$outboundSchema: z.ZodType<OutputFusionServerToolItemResponse$Outbound, OutputFusionServerToolItemResponse>;
|
|
83
|
+
export declare function outputFusionServerToolItemResponseToJSON(outputFusionServerToolItemResponse: OutputFusionServerToolItemResponse): string;
|
|
84
|
+
export declare function outputFusionServerToolItemResponseFromJSON(jsonString: string): SafeParseResult<OutputFusionServerToolItemResponse, SDKValidationError>;
|
|
85
85
|
/** @internal */
|
|
86
86
|
export declare const OutputFusionServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputFusionServerToolItemType>;
|
|
87
87
|
/** @internal */
|
|
@@ -95,7 +95,7 @@ export type OutputFusionServerToolItem$Outbound = {
|
|
|
95
95
|
failed_models?: Array<FailedModel$Outbound> | undefined;
|
|
96
96
|
failure_reason?: string | undefined;
|
|
97
97
|
id?: string | undefined;
|
|
98
|
-
responses?: Array<
|
|
98
|
+
responses?: Array<OutputFusionServerToolItemResponse$Outbound> | undefined;
|
|
99
99
|
sources?: Array<FusionSource$Outbound> | undefined;
|
|
100
100
|
status: string;
|
|
101
101
|
type: string;
|
|
@@ -39,20 +39,20 @@ export function failedModelFromJSON(jsonString) {
|
|
|
39
39
|
return safeParse(jsonString, (x) => FailedModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FailedModel' from JSON`);
|
|
40
40
|
}
|
|
41
41
|
/** @internal */
|
|
42
|
-
export const
|
|
42
|
+
export const OutputFusionServerToolItemResponse$inboundSchema = z.object({
|
|
43
43
|
content: z.string().optional(),
|
|
44
44
|
model: z.string(),
|
|
45
45
|
});
|
|
46
46
|
/** @internal */
|
|
47
|
-
export const
|
|
47
|
+
export const OutputFusionServerToolItemResponse$outboundSchema = z.object({
|
|
48
48
|
content: z.string().optional(),
|
|
49
49
|
model: z.string(),
|
|
50
50
|
});
|
|
51
|
-
export function
|
|
52
|
-
return JSON.stringify(
|
|
51
|
+
export function outputFusionServerToolItemResponseToJSON(outputFusionServerToolItemResponse) {
|
|
52
|
+
return JSON.stringify(OutputFusionServerToolItemResponse$outboundSchema.parse(outputFusionServerToolItemResponse));
|
|
53
53
|
}
|
|
54
|
-
export function
|
|
55
|
-
return safeParse(jsonString, (x) =>
|
|
54
|
+
export function outputFusionServerToolItemResponseFromJSON(jsonString) {
|
|
55
|
+
return safeParse(jsonString, (x) => OutputFusionServerToolItemResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputFusionServerToolItemResponse' from JSON`);
|
|
56
56
|
}
|
|
57
57
|
/** @internal */
|
|
58
58
|
export const OutputFusionServerToolItemType$inboundSchema = z.enum(OutputFusionServerToolItemType);
|
|
@@ -65,7 +65,7 @@ export const OutputFusionServerToolItem$inboundSchema = z.object({
|
|
|
65
65
|
failed_models: z.array(z.lazy(() => FailedModel$inboundSchema)).optional(),
|
|
66
66
|
failure_reason: z.string().optional(),
|
|
67
67
|
id: z.string().optional(),
|
|
68
|
-
responses: z.array(z.lazy(() =>
|
|
68
|
+
responses: z.array(z.lazy(() => OutputFusionServerToolItemResponse$inboundSchema)).optional(),
|
|
69
69
|
sources: z.array(FusionSource$inboundSchema).optional(),
|
|
70
70
|
status: ToolCallStatus$inboundSchema,
|
|
71
71
|
type: OutputFusionServerToolItemType$inboundSchema,
|
|
@@ -82,7 +82,7 @@ export const OutputFusionServerToolItem$outboundSchema = z.object({
|
|
|
82
82
|
failedModels: z.array(z.lazy(() => FailedModel$outboundSchema)).optional(),
|
|
83
83
|
failureReason: z.string().optional(),
|
|
84
84
|
id: z.string().optional(),
|
|
85
|
-
responses: z.array(z.lazy(() =>
|
|
85
|
+
responses: z.array(z.lazy(() => OutputFusionServerToolItemResponse$outboundSchema)).optional(),
|
|
86
86
|
sources: z.array(FusionSource$outboundSchema).optional(),
|
|
87
87
|
status: ToolCallStatus$outboundSchema,
|
|
88
88
|
type: OutputFusionServerToolItemType$outboundSchema,
|
|
@@ -189,7 +189,15 @@ export type PublicEndpoint = {
|
|
|
189
189
|
quantization: Quantization | null;
|
|
190
190
|
status?: EndpointStatus | undefined;
|
|
191
191
|
supportedParameters: Array<Parameter>;
|
|
192
|
+
/**
|
|
193
|
+
* Whether this TTS endpoint accepts an `image_url` reference describing the desired voice. Requests carrying an image reference are only routed to endpoints where this is true.
|
|
194
|
+
*/
|
|
195
|
+
supportsImageReference: boolean;
|
|
192
196
|
supportsImplicitCaching: boolean;
|
|
197
|
+
/**
|
|
198
|
+
* Whether this TTS endpoint accepts more than one `input_audio` reference clip per request. Requests carrying several clips are only routed to endpoints where this is true.
|
|
199
|
+
*/
|
|
200
|
+
supportsMultipleAudioReferences: boolean;
|
|
193
201
|
/**
|
|
194
202
|
* Per-variant `tool_choice` support. `tool_choice` in `supported_parameters` only says the parameter is accepted; these flags say which of its values passed testing.
|
|
195
203
|
*/
|
|
@@ -201,7 +201,9 @@ export const PublicEndpoint$inboundSchema = z.object({
|
|
|
201
201
|
quantization: z.nullable(Quantization$inboundSchema),
|
|
202
202
|
status: EndpointStatus$inboundSchema.optional(),
|
|
203
203
|
supported_parameters: z.array(Parameter$inboundSchema),
|
|
204
|
+
supports_image_reference: z.boolean().default(false),
|
|
204
205
|
supports_implicit_caching: z.boolean(),
|
|
206
|
+
supports_multiple_audio_references: z.boolean().default(false),
|
|
205
207
|
supports_tool_choice: ToolChoiceSupport$inboundSchema,
|
|
206
208
|
supports_voice_cloning: z.boolean().default(false),
|
|
207
209
|
tag: z.string(),
|
|
@@ -220,7 +222,9 @@ export const PublicEndpoint$inboundSchema = z.object({
|
|
|
220
222
|
"perf_last_30m_by_workload": "perfLast30mByWorkload",
|
|
221
223
|
"provider_name": "providerName",
|
|
222
224
|
"supported_parameters": "supportedParameters",
|
|
225
|
+
"supports_image_reference": "supportsImageReference",
|
|
223
226
|
"supports_implicit_caching": "supportsImplicitCaching",
|
|
227
|
+
"supports_multiple_audio_references": "supportsMultipleAudioReferences",
|
|
224
228
|
"supports_tool_choice": "supportsToolChoice",
|
|
225
229
|
"supports_voice_cloning": "supportsVoiceCloning",
|
|
226
230
|
"throughput_last_30m": "throughputLast30m",
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { SpeechInputReferenceAudio, SpeechInputReferenceAudio$Outbound } from "./speechinputreferenceaudio.js";
|
|
3
|
+
import { SpeechInputReferenceImage, SpeechInputReferenceImage$Outbound } from "./speechinputreferenceimage.js";
|
|
3
4
|
import { SpeechInputReferenceText, SpeechInputReferenceText$Outbound } from "./speechinputreferencetext.js";
|
|
4
5
|
/**
|
|
5
|
-
* Reference content part for stateless voice cloning
|
|
6
|
+
* Reference content part for stateless voice cloning or voice design
|
|
6
7
|
*/
|
|
7
|
-
export type SpeechInputReference = SpeechInputReferenceAudio | SpeechInputReferenceText;
|
|
8
|
+
export type SpeechInputReference = SpeechInputReferenceImage | SpeechInputReferenceAudio | SpeechInputReferenceText;
|
|
8
9
|
/** @internal */
|
|
9
|
-
export type SpeechInputReference$Outbound = SpeechInputReferenceAudio$Outbound | SpeechInputReferenceText$Outbound;
|
|
10
|
+
export type SpeechInputReference$Outbound = SpeechInputReferenceImage$Outbound | SpeechInputReferenceAudio$Outbound | SpeechInputReferenceText$Outbound;
|
|
10
11
|
/** @internal */
|
|
11
12
|
export declare const SpeechInputReference$outboundSchema: z.ZodType<SpeechInputReference$Outbound, SpeechInputReference>;
|
|
12
13
|
export declare function speechInputReferenceToJSON(speechInputReference: SpeechInputReference): string;
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { SpeechInputReferenceAudio$outboundSchema, } from "./speechinputreferenceaudio.js";
|
|
7
|
+
import { SpeechInputReferenceImage$outboundSchema, } from "./speechinputreferenceimage.js";
|
|
7
8
|
import { SpeechInputReferenceText$outboundSchema, } from "./speechinputreferencetext.js";
|
|
8
9
|
/** @internal */
|
|
9
10
|
export const SpeechInputReference$outboundSchema = z.union([
|
|
11
|
+
SpeechInputReferenceImage$outboundSchema,
|
|
10
12
|
SpeechInputReferenceAudio$outboundSchema,
|
|
11
13
|
SpeechInputReferenceText$outboundSchema,
|
|
12
14
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { SpeechInputReferenceAudioInput, SpeechInputReferenceAudioInput$Outbound } from "./speechinputreferenceaudioinput.js";
|
|
3
3
|
/**
|
|
4
|
-
* Reference audio input for stateless voice cloning
|
|
4
|
+
* Reference audio input for stateless voice cloning. Up to three parts per request; the Nth audio part is addressable from `input` as `@AudioN` on providers that support multiple references.
|
|
5
5
|
*/
|
|
6
6
|
export type SpeechInputReferenceAudio = {
|
|
7
7
|
/**
|
|
@@ -4,18 +4,23 @@ import * as z from "zod/v4";
|
|
|
4
4
|
*/
|
|
5
5
|
export type SpeechInputReferenceAudioInput = {
|
|
6
6
|
/**
|
|
7
|
-
* Base64-encoded reference audio (optionally a data URI). Supported audio formats are provider-specific. Limited to 20 MiB of base64 (15 MiB of decoded audio).
|
|
7
|
+
* Base64-encoded reference audio (optionally a data URI). Supported audio formats are provider-specific. Limited to 20 MiB of base64 (15 MiB of decoded audio). Exactly one of `data` or `url` is required.
|
|
8
8
|
*/
|
|
9
|
-
data
|
|
9
|
+
data?: string | undefined;
|
|
10
10
|
/**
|
|
11
11
|
* Audio format of the reference audio (e.g., wav, mp3). Optional; most providers detect the format from the audio bytes.
|
|
12
12
|
*/
|
|
13
13
|
format?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Public http(s) URL of the reference audio. OpenRouter downloads it (15 MiB max) and forwards the bytes, never the URL. Exactly one of `data` or `url` is required.
|
|
16
|
+
*/
|
|
17
|
+
url?: string | undefined;
|
|
14
18
|
};
|
|
15
19
|
/** @internal */
|
|
16
20
|
export type SpeechInputReferenceAudioInput$Outbound = {
|
|
17
|
-
data
|
|
21
|
+
data?: string | undefined;
|
|
18
22
|
format?: string | undefined;
|
|
23
|
+
url?: string | undefined;
|
|
19
24
|
};
|
|
20
25
|
/** @internal */
|
|
21
26
|
export declare const SpeechInputReferenceAudioInput$outboundSchema: z.ZodType<SpeechInputReferenceAudioInput$Outbound, SpeechInputReferenceAudioInput>;
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export const SpeechInputReferenceAudioInput$outboundSchema = z.object({
|
|
8
|
-
data: z.string(),
|
|
8
|
+
data: z.string().optional(),
|
|
9
9
|
format: z.string().optional(),
|
|
10
|
+
url: z.string().optional(),
|
|
10
11
|
});
|
|
11
12
|
export function speechInputReferenceAudioInputToJSON(speechInputReferenceAudioInput) {
|
|
12
13
|
return JSON.stringify(SpeechInputReferenceAudioInput$outboundSchema.parse(speechInputReferenceAudioInput));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { SpeechInputReferenceImageInput, SpeechInputReferenceImageInput$Outbound } from "./speechinputreferenceimageinput.js";
|
|
3
|
+
/**
|
|
4
|
+
* Reference image describing the desired voice. Cannot be combined with `input_audio` parts. Only routed to endpoints that support image references.
|
|
5
|
+
*/
|
|
6
|
+
export type SpeechInputReferenceImage = {
|
|
7
|
+
/**
|
|
8
|
+
* Reference image input object
|
|
9
|
+
*/
|
|
10
|
+
imageUrl: SpeechInputReferenceImageInput;
|
|
11
|
+
type: "image_url";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type SpeechInputReferenceImage$Outbound = {
|
|
15
|
+
image_url: SpeechInputReferenceImageInput$Outbound;
|
|
16
|
+
type: "image_url";
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const SpeechInputReferenceImage$outboundSchema: z.ZodType<SpeechInputReferenceImage$Outbound, SpeechInputReferenceImage>;
|
|
20
|
+
export declare function speechInputReferenceImageToJSON(speechInputReferenceImage: SpeechInputReferenceImage): string;
|
|
21
|
+
//# sourceMappingURL=speechinputreferenceimage.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ee7097a5c9df
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { SpeechInputReferenceImageInput$outboundSchema, } from "./speechinputreferenceimageinput.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const SpeechInputReferenceImage$outboundSchema = z.object({
|
|
10
|
+
imageUrl: SpeechInputReferenceImageInput$outboundSchema,
|
|
11
|
+
type: z.literal("image_url"),
|
|
12
|
+
}).transform((v) => {
|
|
13
|
+
return remap$(v, {
|
|
14
|
+
imageUrl: "image_url",
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
export function speechInputReferenceImageToJSON(speechInputReferenceImage) {
|
|
18
|
+
return JSON.stringify(SpeechInputReferenceImage$outboundSchema.parse(speechInputReferenceImage));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=speechinputreferenceimage.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
/**
|
|
3
|
+
* Reference image input object
|
|
4
|
+
*/
|
|
5
|
+
export type SpeechInputReferenceImageInput = {
|
|
6
|
+
/**
|
|
7
|
+
* JPEG, PNG, or WebP reference image as a base64 data URI or a public http(s) URL. Remote images are downloaded (15 MiB max) and forwarded as bytes, never as the URL.
|
|
8
|
+
*/
|
|
9
|
+
url: string;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export type SpeechInputReferenceImageInput$Outbound = {
|
|
13
|
+
url: string;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const SpeechInputReferenceImageInput$outboundSchema: z.ZodType<SpeechInputReferenceImageInput$Outbound, SpeechInputReferenceImageInput>;
|
|
17
|
+
export declare function speechInputReferenceImageInputToJSON(speechInputReferenceImageInput: SpeechInputReferenceImageInput): string;
|
|
18
|
+
//# sourceMappingURL=speechinputreferenceimageinput.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 36100583e975
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const SpeechInputReferenceImageInput$outboundSchema = z.object({
|
|
8
|
+
url: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export function speechInputReferenceImageInputToJSON(speechInputReferenceImageInput) {
|
|
11
|
+
return JSON.stringify(SpeechInputReferenceImageInput$outboundSchema.parse(speechInputReferenceImageInput));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=speechinputreferenceimageinput.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
/**
|
|
3
|
-
* Transcript of
|
|
3
|
+
* Transcript of an `input_audio` part
|
|
4
4
|
*/
|
|
5
5
|
export type SpeechInputReferenceText = {
|
|
6
6
|
/**
|
|
7
|
-
* Transcript of the
|
|
7
|
+
* Transcript of an `input_audio` part. With a single clip it may appear before or after the clip; with multiple clips it must immediately follow the clip it transcribes.
|
|
8
8
|
*/
|
|
9
9
|
text: string;
|
|
10
10
|
type: "text";
|
|
@@ -32,7 +32,7 @@ export type SpeechRequest = {
|
|
|
32
32
|
*/
|
|
33
33
|
input: string;
|
|
34
34
|
/**
|
|
35
|
-
* Reference content for stateless voice cloning: one `input_audio`
|
|
35
|
+
* Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each transcript immediately follows its clip); only routed to endpoints that support voice cloning (and multiple references when more than one part is sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. The two modes cannot be mixed. An empty array is treated as no reference.
|
|
36
36
|
*/
|
|
37
37
|
inputReferences?: Array<SpeechInputReference> | undefined;
|
|
38
38
|
/**
|
|
@@ -3,7 +3,7 @@ import { OpenEnum } from "../types/enums.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* The category of feedback being reported
|
|
5
5
|
*/
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SubmitGenerationFeedbackRequestCategory: {
|
|
7
7
|
readonly Latency: "latency";
|
|
8
8
|
readonly Incoherence: "incoherence";
|
|
9
9
|
readonly IncorrectResponse: "incorrect_response";
|
|
@@ -15,7 +15,7 @@ export declare const Category: {
|
|
|
15
15
|
/**
|
|
16
16
|
* The category of feedback being reported
|
|
17
17
|
*/
|
|
18
|
-
export type
|
|
18
|
+
export type SubmitGenerationFeedbackRequestCategory = OpenEnum<typeof SubmitGenerationFeedbackRequestCategory>;
|
|
19
19
|
/**
|
|
20
20
|
* Structured feedback about a specific generation
|
|
21
21
|
*/
|
|
@@ -23,7 +23,7 @@ export type SubmitGenerationFeedbackRequest = {
|
|
|
23
23
|
/**
|
|
24
24
|
* The category of feedback being reported
|
|
25
25
|
*/
|
|
26
|
-
category:
|
|
26
|
+
category: SubmitGenerationFeedbackRequestCategory;
|
|
27
27
|
/**
|
|
28
28
|
* An optional free-text comment describing the feedback
|
|
29
29
|
*/
|
|
@@ -34,7 +34,7 @@ export type SubmitGenerationFeedbackRequest = {
|
|
|
34
34
|
generationId: string;
|
|
35
35
|
};
|
|
36
36
|
/** @internal */
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const SubmitGenerationFeedbackRequestCategory$outboundSchema: z.ZodType<string, SubmitGenerationFeedbackRequestCategory>;
|
|
38
38
|
/** @internal */
|
|
39
39
|
export type SubmitGenerationFeedbackRequest$Outbound = {
|
|
40
40
|
category: string;
|
|
@@ -8,7 +8,7 @@ import * as openEnums from "../types/enums.js";
|
|
|
8
8
|
/**
|
|
9
9
|
* The category of feedback being reported
|
|
10
10
|
*/
|
|
11
|
-
export const
|
|
11
|
+
export const SubmitGenerationFeedbackRequestCategory = {
|
|
12
12
|
Latency: "latency",
|
|
13
13
|
Incoherence: "incoherence",
|
|
14
14
|
IncorrectResponse: "incorrect_response",
|
|
@@ -18,11 +18,10 @@ export const Category = {
|
|
|
18
18
|
Other: "other",
|
|
19
19
|
};
|
|
20
20
|
/** @internal */
|
|
21
|
-
export const
|
|
22
|
-
.outboundSchema(Category);
|
|
21
|
+
export const SubmitGenerationFeedbackRequestCategory$outboundSchema = openEnums.outboundSchema(SubmitGenerationFeedbackRequestCategory);
|
|
23
22
|
/** @internal */
|
|
24
23
|
export const SubmitGenerationFeedbackRequest$outboundSchema = z.object({
|
|
25
|
-
category:
|
|
24
|
+
category: SubmitGenerationFeedbackRequestCategory$outboundSchema,
|
|
26
25
|
comment: z.string().optional(),
|
|
27
26
|
generationId: z.string(),
|
|
28
27
|
}).transform((v) => {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as models from "../models/index.js";
|
|
3
|
+
import * as operations from "../models/operations/index.js";
|
|
4
|
+
import { PageIterator } from "../types/operations.js";
|
|
5
|
+
export declare class Batch extends ClientSDK {
|
|
6
|
+
/**
|
|
7
|
+
* List batches
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Lists batches in the workspace of the authenticating API key, newest first. To fetch the next page, pass the previous page's `last_id` as `after`. List items omit `results`. Use `GET /batches/{id}` to get them. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).
|
|
11
|
+
*/
|
|
12
|
+
list(request?: operations.ListBatchesRequest | undefined, options?: RequestOptions): Promise<PageIterator<operations.ListBatchesResponse, {
|
|
13
|
+
cursor: string;
|
|
14
|
+
}>>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a batch
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Creates a batch of requests that run asynchronously against a single endpoint (`/v1/chat/completions`, `/v1/responses`, `/v1/messages`, `/v1/embeddings`). Returns `202` with `status: "validating"`. Poll `GET /batches/{id}` for progress and results. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).
|
|
20
|
+
*/
|
|
21
|
+
createBatches(request: operations.CreateBatchesRequest, options?: RequestOptions): Promise<models.BatchObject>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a batch
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Deletes a batch in a terminal status (`completed`, `failed`, `expired`, or `cancelled`) and its stored requests and results. Batches still in progress return `409`. Billing and usage records are kept. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).
|
|
27
|
+
*/
|
|
28
|
+
delete(request: operations.DeleteBatchRequest, options?: RequestOptions): Promise<models.BatchDeletedObject>;
|
|
29
|
+
/**
|
|
30
|
+
* Get a batch
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Returns a batch with its status and request counts. Batches in a terminal status include `results`. Failed batches report the reason in `error.message`. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).
|
|
34
|
+
*/
|
|
35
|
+
getBatches(request: operations.GetBatchesRequest, options?: RequestOptions): Promise<models.BatchObject>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=batch.d.ts.map
|