import * as z from "zod/v4-mini"; import * as models from "../index.js"; import { ModerationAPIError } from "./moderation-api-error.js"; /** * The API key is missing, invalid or revoked. */ export type AuthenticationErrorData = { /** * Broad error category. Stable; safe to switch on. */ type: "authentication_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `unauthorized`: Authentication failed. * - `missing_api_key`: No API key in the `Authorization` header. * - `malformed_api_key`: The `Authorization` header does not contain a valid key format. * - `invalid_api_key`: The API key does not exist or was revoked. */ code: models.AuthenticationErrorCode; /** * Human-readable explanation. */ message: string; /** * Validation problems, when the request body is invalid. */ issues?: Array | undefined; /** * Identifies this request. Include it when you contact support. */ requestId: string; /** * Documentation for this `code`. */ docUrl: string; }; /** * The API key is missing, invalid or revoked. */ export declare class AuthenticationError extends ModerationAPIError { /** * Broad error category. Stable; safe to switch on. */ type: "authentication_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `unauthorized`: Authentication failed. * - `missing_api_key`: No API key in the `Authorization` header. * - `malformed_api_key`: The `Authorization` header does not contain a valid key format. * - `invalid_api_key`: The API key does not exist or was revoked. */ code: models.AuthenticationErrorCode; /** * Validation problems, when the request body is invalid. */ issues?: Array | undefined; /** * Identifies this request. Include it when you contact support. */ requestId: string; /** * Documentation for this `code`. */ docUrl: string; /** The original data that was passed to this error instance. */ data$: AuthenticationErrorData; constructor(err: AuthenticationErrorData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const AuthenticationError$inboundSchema: z.ZodMiniType; //# sourceMappingURL=authentication-error.d.ts.map