import * as z from "zod/v4-mini"; import * as models from "../index.js"; import { ModerationAPIError } from "./moderation-api-error.js"; /** * Too many requests. Retry after the number of seconds in the `Retry-After` header. */ export type RateLimitErrorData = { /** * Broad error category. Stable; safe to switch on. */ type: "rate_limit_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `rate_limit_exceeded`: Too many requests. Wait for the `Retry-After` seconds. */ code: models.RateLimitErrorCode; /** * 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; }; /** * Too many requests. Retry after the number of seconds in the `Retry-After` header. */ export declare class RateLimitError extends ModerationAPIError { /** * Broad error category. Stable; safe to switch on. */ type: "rate_limit_error"; /** * Exactly what went wrong. Stable; safe to branch on. New codes may be added. * * @remarks * * - `rate_limit_exceeded`: Too many requests. Wait for the `Retry-After` seconds. */ code: models.RateLimitErrorCode; /** * 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$: RateLimitErrorData; constructor(err: RateLimitErrorData, httpMeta: { response: Response; request: Request; body: string; }); } /** @internal */ export declare const RateLimitError$inboundSchema: z.ZodMiniType; //# sourceMappingURL=rate-limit-error.d.ts.map