import * as z from "zod/v4";
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 type ImageGenerationUsageCompletionTokensDetails = {
    /**
     * 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 ImageGenerationUsagePromptTokensDetails = {
    /**
     * 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 ServerToolUse = {
    /**
     * 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;
};
/**
 * Token and cost usage for the image generation request, when available
 */
export type ImageGenerationUsage = {
    cacheCreation?: AnthropicCacheCreation | null | undefined;
    /**
     * The tokens generated
     */
    completionTokens: number;
    completionTokensDetails?: ImageGenerationUsageCompletionTokensDetails | 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<AnthropicUsageIteration> | null | undefined;
    /**
     * Including images, input audio, and tools if any
     */
    promptTokens: number;
    /**
     * Breakdown of tokens used in the prompt.
     */
    promptTokensDetails?: ImageGenerationUsagePromptTokensDetails | null | undefined;
    /**
     * Usage for server-side tool execution (e.g., web search)
     */
    serverToolUse?: ServerToolUse | 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;
};
/** @internal */
export declare const ImageGenerationUsageCompletionTokensDetails$inboundSchema: z.ZodType<ImageGenerationUsageCompletionTokensDetails, unknown>;
export declare function imageGenerationUsageCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsageCompletionTokensDetails, SDKValidationError>;
/** @internal */
export declare const ImageGenerationUsagePromptTokensDetails$inboundSchema: z.ZodType<ImageGenerationUsagePromptTokensDetails, unknown>;
export declare function imageGenerationUsagePromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsagePromptTokensDetails, SDKValidationError>;
/** @internal */
export declare const ServerToolUse$inboundSchema: z.ZodType<ServerToolUse, unknown>;
export declare function serverToolUseFromJSON(jsonString: string): SafeParseResult<ServerToolUse, SDKValidationError>;
/** @internal */
export declare const ImageGenerationUsage$inboundSchema: z.ZodType<ImageGenerationUsage, unknown>;
export declare function imageGenerationUsageFromJSON(jsonString: string): SafeParseResult<ImageGenerationUsage, SDKValidationError>;
//# sourceMappingURL=imagegenerationusage.d.ts.map