import * as z from "zod/v4";
import { OpenEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
import { ProviderResponse } from "./providerresponse.js";
/**
 * Type of API used for the generation
 */
export declare const ApiType: {
    readonly Completions: "completions";
    readonly Embeddings: "embeddings";
    readonly Rerank: "rerank";
    readonly TTS: "tts";
    readonly STT: "stt";
    readonly Video: "video";
    readonly Image: "image";
};
/**
 * Type of API used for the generation
 */
export type ApiType = OpenEnum<typeof ApiType>;
/**
 * The data region this generation was routed through: 'global', 'europe', or 'us'.
 */
export declare const DataRegion: {
    readonly Global: "global";
    readonly Europe: "europe";
    readonly Us: "us";
};
/**
 * The data region this generation was routed through: 'global', 'europe', or 'us'.
 */
export type DataRegion = OpenEnum<typeof DataRegion>;
/**
 * Generation data
 */
export type GenerationResponseData = {
    /**
     * Type of API used for the generation
     */
    apiType: ApiType | null;
    /**
     * ID of the app that made the request
     */
    appId: number | null;
    /**
     * Discount applied due to caching
     */
    cacheDiscount: number | null;
    /**
     * Whether the generation was cancelled
     */
    cancelled: boolean | null;
    /**
     * ISO 8601 timestamp of when the generation was created
     */
    createdAt: string;
    /**
     * The data region this generation was routed through: 'global', 'europe', or 'us'.
     */
    dataRegion: DataRegion;
    /**
     * External user identifier
     */
    externalUser: string | null;
    /**
     * Reason the generation finished
     */
    finishReason: string | null;
    /**
     * Time taken for generation in milliseconds
     */
    generationTime: number | null;
    /**
     * Referer header from the request
     */
    httpReferer: string | null;
    /**
     * Unique identifier for the generation
     */
    id: string;
    /**
     * Whether this used bring-your-own-key
     */
    isByok: boolean;
    /**
     * Total latency in milliseconds
     */
    latency: number | null;
    /**
     * Model used for the generation
     */
    model: string;
    /**
     * Moderation latency in milliseconds
     */
    moderationLatency: number | null;
    /**
     * Native finish reason as reported by provider
     */
    nativeFinishReason: string | null;
    /**
     * Native cached tokens as reported by provider
     */
    nativeTokensCached: number | null;
    /**
     * Native completion tokens as reported by provider
     */
    nativeTokensCompletion: number | null;
    /**
     * Native completion image tokens as reported by provider
     */
    nativeTokensCompletionImages: number | null;
    /**
     * Native prompt tokens as reported by provider
     */
    nativeTokensPrompt: number | null;
    /**
     * Native reasoning tokens as reported by provider
     */
    nativeTokensReasoning: number | null;
    /**
     * Number of web fetches performed
     */
    numFetches: number | null;
    /**
     * Number of audio inputs in the prompt
     */
    numInputAudioPrompt: number | null;
    /**
     * Number of media items in the completion
     */
    numMediaCompletion: number | null;
    /**
     * Number of media items in the prompt
     */
    numMediaPrompt: number | null;
    /**
     * Number of search results included
     */
    numSearchResults: number | null;
    /**
     * Origin URL of the request
     */
    origin: string;
    /**
     * ID of the preset used for this generation, null if no preset was used
     */
    presetId: string | null;
    /**
     * Name of the provider that served the request
     */
    providerName: string | null;
    /**
     * List of provider responses for this generation, including fallback attempts
     */
    providerResponses: Array<ProviderResponse> | null;
    /**
     * Unique identifier grouping all generations from a single API request
     */
    requestId?: string | null | undefined;
    /**
     * If this generation was served from response cache, contains the original generation ID. Null otherwise.
     */
    responseCacheSourceId?: string | null | undefined;
    /**
     * Router used for the request (e.g., openrouter/auto)
     */
    router: string | null;
    /**
     * Service tier the upstream provider reported running this request on, or null if it did not report one.
     */
    serviceTier: string | null;
    /**
     * Session identifier grouping multiple generations in the same session
     */
    sessionId?: string | null | undefined;
    /**
     * Whether the response was streamed
     */
    streamed: boolean | null;
    /**
     * Number of tokens in the completion
     */
    tokensCompletion: number | null;
    /**
     * Number of tokens in the prompt
     */
    tokensPrompt: number | null;
    /**
     * Total cost of the generation in USD
     */
    totalCost: number;
    /**
     * Upstream provider's identifier for this generation
     */
    upstreamId: string | null;
    /**
     * Cost charged by the upstream provider
     */
    upstreamInferenceCost: number | null;
    /**
     * Usage amount in USD
     */
    usage: number;
    /**
     * User-Agent header from the request
     */
    userAgent: string | null;
    /**
     * The resolved web search engine used for this generation (e.g. exa, firecrawl, parallel)
     */
    webSearchEngine: string | null;
    /**
     * ID of the workspace this generation is attributed to. Null for accounts without workspaces. Generations created before workspace resolution existed are attributed to the account default workspace.
     */
    workspaceId: string | null;
};
/**
 * Generation response
 */
export type GenerationResponse = {
    /**
     * Generation data
     */
    data: GenerationResponseData;
};
/** @internal */
export declare const ApiType$inboundSchema: z.ZodType<ApiType, unknown>;
/** @internal */
export declare const DataRegion$inboundSchema: z.ZodType<DataRegion, unknown>;
/** @internal */
export declare const GenerationResponseData$inboundSchema: z.ZodType<GenerationResponseData, unknown>;
export declare function generationResponseDataFromJSON(jsonString: string): SafeParseResult<GenerationResponseData, SDKValidationError>;
/** @internal */
export declare const GenerationResponse$inboundSchema: z.ZodType<GenerationResponse, unknown>;
export declare function generationResponseFromJSON(jsonString: string): SafeParseResult<GenerationResponse, SDKValidationError>;
//# sourceMappingURL=generationresponse.d.ts.map