import * as z from "zod/v4"; import { ClosedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { AnthropicCacheCreation } from "./anthropiccachecreation.js"; import { AnthropicSpeed } from "./anthropicspeed.js"; import { AnthropicUsageIteration } from "./anthropicusageiteration.js"; import { CostDetails } from "./costdetails.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export declare const BatchListItemCompletionWindow: { readonly TwentyFourh: "24h"; }; export type BatchListItemCompletionWindow = ClosedEnum; export type BatchListItemError = { message: string; }; export declare const BatchListItemObject: { readonly Batch: "batch"; }; export type BatchListItemObject = ClosedEnum; export type BatchListItemRequestCounts = { completed: number; failed: number; total: number; }; export declare const BatchListItemStatus: { readonly Validating: "validating"; readonly InProgress: "in_progress"; readonly Finalizing: "finalizing"; readonly Completed: "completed"; readonly Failed: "failed"; readonly Expired: "expired"; readonly Cancelling: "cancelling"; readonly Cancelled: "cancelled"; }; export type BatchListItemStatus = OpenEnum; export type BatchListItemCompletionTokensDetails = { /** * Tokens generated by the model for audio output. */ audioTokens?: number | null | undefined; /** * Tokens generated by the model for image output. */ imageTokens?: number | null | undefined; /** * Tokens generated by the model for reasoning. */ reasoningTokens?: number | null | undefined; }; /** * Breakdown of tokens used in the prompt. */ export type BatchListItemPromptTokensDetails = { /** * Tokens used for input audio. */ audioTokens?: number | null | undefined; /** * Tokens written to cache. Only returned for models with explicit caching and cache write pricing. */ cacheWriteTokens?: number | null | undefined; /** * Tokens cached by the endpoint. */ cachedTokens?: number | null | undefined; /** * Tokens used for input files/documents. */ fileTokens?: number | null | undefined; /** * Tokens used for input video. */ videoTokens?: number | null | undefined; }; /** * Usage for server-side tool execution (e.g., web search) */ export type BatchListItemServerToolUse = { /** * Number of OpenRouter server tool calls that executed and produced a result. */ toolCallsExecuted?: number | null | undefined; /** * Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. */ toolCallsRequested?: number | null | undefined; /** * Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. */ webSearchRequests?: number | null | undefined; }; export type BatchListItemUsage = { cacheCreation?: AnthropicCacheCreation | null | undefined; /** * The tokens generated */ completionTokens: number; completionTokensDetails?: BatchListItemCompletionTokensDetails | null | undefined; /** * Cost of the completion */ cost?: number | null | undefined; /** * Breakdown of upstream inference costs */ costDetails?: CostDetails | null | undefined; /** * Whether a request was made using a Bring Your Own Key configuration */ isByok?: boolean | undefined; iterations?: Array | null | undefined; /** * Including images, input audio, and tools if any */ promptTokens: number; /** * Breakdown of tokens used in the prompt. */ promptTokensDetails?: BatchListItemPromptTokensDetails | null | undefined; /** * Usage for server-side tool execution (e.g., web search) */ serverToolUse?: BatchListItemServerToolUse | null | undefined; /** * The service tier used by the upstream provider for this request */ serviceTier?: string | null | undefined; speed?: AnthropicSpeed | null | undefined; /** * Sum of the above two fields */ totalTokens: number; }; /** * Metadata-only batch object. `results` is always `null` in list responses. */ export type BatchListItem = { completionWindow: BatchListItemCompletionWindow; createdAt: number; endpoint: string; error: BatchListItemError | null; finalizedAt: number | null; id: string; model: string; object: BatchListItemObject; requestCounts: BatchListItemRequestCounts; /** * Always null: retrieve the batch with `GET /batches/{id}` to access its results. */ results: any | null; status: BatchListItemStatus; usage: BatchListItemUsage | null; }; /** @internal */ export declare const BatchListItemCompletionWindow$inboundSchema: z.ZodEnum; /** @internal */ export declare const BatchListItemError$inboundSchema: z.ZodType; export declare function batchListItemErrorFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItemObject$inboundSchema: z.ZodEnum; /** @internal */ export declare const BatchListItemRequestCounts$inboundSchema: z.ZodType; export declare function batchListItemRequestCountsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItemStatus$inboundSchema: z.ZodType; /** @internal */ export declare const BatchListItemCompletionTokensDetails$inboundSchema: z.ZodType; export declare function batchListItemCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItemPromptTokensDetails$inboundSchema: z.ZodType; export declare function batchListItemPromptTokensDetailsFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItemServerToolUse$inboundSchema: z.ZodType; export declare function batchListItemServerToolUseFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItemUsage$inboundSchema: z.ZodType; export declare function batchListItemUsageFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const BatchListItem$inboundSchema: z.ZodType; export declare function batchListItemFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=batchlistitem.d.ts.map