import { type IAnthropicModelConnection, type IAnthropicOAuthModel, type IAnthropicOAuthModelListOptions, type TAnthropicOAuthRequestOutcome } from './smartai.oauth.anthropic.js'; export declare class AnthropicApiKeyAuthError extends Error { status?: number; requestOutcome?: TAnthropicOAuthRequestOutcome; constructor(message: string, options?: { status?: number; requestOutcome?: TAnthropicOAuthRequestOutcome; }); } /** An Anthropic API key, as the Claude Console issues it. */ export interface IAnthropicApiKeyAccess { readonly apiKey: string; } export interface IAnthropicApiKeyConnectionOptions extends IAnthropicApiKeyAccess { /** Optional underlying transport. Defaults to the current global fetch. */ readonly fetch?: typeof fetch; } /** * The headers an API-key request authenticates with, over the request's own: the key replaces any credential the * request carried (an `authorization` bearer included), the OAuth beta leaves the request's betas, and the API * version is the request's or `2023-06-01`. Shared by inference and the model list. */ export declare function createAnthropicApiKeyHeaders(accessArg: IAnthropicApiKeyAccess, headersArg?: HeadersInit): Headers; /** * An Anthropic API connection on an API key, for inference billed to the key's Claude Console organization. * * Requests go only to `https://api.anthropic.com/v1`, with `x-api-key` and without any bearer token or OAuth beta. * A provider 401 fails with an `AnthropicApiKeyAuthError` whose `status` is 401, since a rejected key does not renew; * every other status is the caller's. */ export declare const createAnthropicApiKeyConnection: (optionsArg: IAnthropicApiKeyConnectionOptions) => IAnthropicModelConnection; /** * Reads the models an API key may use from `GET /v1/models`, in the shape and with the paging and failures of * `listAnthropicOAuthModels`, authenticated with `x-api-key`. A rejected key fails with an `AnthropicApiKeyAuthError` * whose `status` is 401. */ export declare function listAnthropicApiKeyModels(accessArg: IAnthropicApiKeyAccess, optionsArg?: IAnthropicOAuthModelListOptions): Promise;