export declare const OPENAI_V1_AUDIO_SPEECH_ENDPOINT: "/v1/audio/speech";
export declare const DEFAULT_OPENAI_V1_AUDIO_SPEECH_BASE_URL: "https://api.openai.com";
export type OpenAIV1AudioSpeechBoundary = "input" | "contract" | "governance" | "auth" | "scope" | "provider" | "response";
export type OpenAIV1AudioSpeechErrorCode = "MISSING_BODY" | "MISSING_RUNTIME_ID" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "AUTH_REJECTED" | "CALLER_REQUIRED" | "PROVIDER_AUTH_FAILED" | "PROVIDER_RATE_LIMITED" | "PROVIDER_TIMEOUT" | "PROVIDER_UNAVAILABLE" | "RESPONSE_FORMAT_DRIFT" | "CALLER_FAILED";
export type OpenAIV1AudioSpeechGate = {
    accepted: boolean;
    reason?: string;
};
export type OpenAIV1AudioSpeechRuntimeContext = {
    runtimeId?: string;
    invocationId?: string;
    traceId?: string;
    callerId?: string;
};
export type OpenAIV1AudioSpeechAuthEnvelope = {
    kind: "bearer" | "api-key" | "none";
    present: boolean;
    redactedToken?: string;
};
export type OpenAIV1AudioSpeechRequestEnvelope = {
    provider: "openai";
    apiVersion: "v1";
    endpoint: typeof OPENAI_V1_AUDIO_SPEECH_ENDPOINT;
    operation: "create-speech";
    method: "POST";
    url: string;
    headers: Readonly<Record<string, string>>;
    body: unknown;
    runtime: Required<OpenAIV1AudioSpeechRuntimeContext>;
    requestedScopes: readonly string[];
    grantedScopes: readonly string[];
    dryRun: boolean;
    providerCallPlanned: boolean;
    unsafeSideEffects: false;
    providerFieldsOpaque: true;
};
export type OpenAIV1AudioSpeechProviderCaller = (envelope: OpenAIV1AudioSpeechRequestEnvelope) => unknown | Promise<unknown>;
export type OpenAIV1AudioSpeechInvocationRequest = {
    body?: unknown;
    baseUrl?: string;
    headers?: Readonly<Record<string, string | undefined>>;
    auth?: OpenAIV1AudioSpeechAuthEnvelope;
    runtime?: OpenAIV1AudioSpeechRuntimeContext;
    requiredScopes?: readonly string[];
    allowedScopes?: readonly string[];
    contract?: OpenAIV1AudioSpeechGate;
    governance?: OpenAIV1AudioSpeechGate;
    dryRun?: boolean;
    mockResponse?: unknown;
    expectBinaryLikeResponse?: boolean;
    caller?: OpenAIV1AudioSpeechProviderCaller;
};
export type OpenAIV1AudioSpeechResponseEnvelope = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_AUDIO_SPEECH_ENDPOINT;
    mode: "dry-run" | "mock" | "caller";
    raw: unknown;
    providerFieldsOpaque: true;
};
export type OpenAIV1AudioSpeechCapabilitySignal = {
    provider: "openai";
    endpoint: typeof OPENAI_V1_AUDIO_SPEECH_ENDPOINT;
    operation: "create-speech";
    rawShape: "audio-bytes" | "mock" | "dry-run";
};
export type OpenAIV1AudioSpeechError = {
    code: OpenAIV1AudioSpeechErrorCode;
    message: string;
    boundary: OpenAIV1AudioSpeechBoundary;
    retryable: boolean;
};
export type OpenAIV1AudioSpeechResult = {
    ok: true;
    request: OpenAIV1AudioSpeechRequestEnvelope;
    response: OpenAIV1AudioSpeechResponseEnvelope;
    capability: OpenAIV1AudioSpeechCapabilitySignal;
    events: readonly string[];
} | {
    ok: false;
    error: OpenAIV1AudioSpeechError;
    request?: OpenAIV1AudioSpeechRequestEnvelope;
    events: readonly string[];
};
export declare function classifyOpenAIV1AudioSpeechProviderError(error: unknown): OpenAIV1AudioSpeechErrorCode;
export declare function invokeOpenAIV1AudioSpeech(input?: OpenAIV1AudioSpeechInvocationRequest): Promise<OpenAIV1AudioSpeechResult>;
