OpenAI Error

OpenAI API error response with message, type, param, and code.

Report an issue
openai

Install

$ npx shadcn@latest add @open-types/openai-error

Source

export interface OpenAIErrorDetail {
  message: string;
  type: string;
  param: string | null;
  code: string | null;
}

export interface OpenAIErrorResponse {
  error: OpenAIErrorDetail;
}
export interface OpenAIErrorDetail {
  message: string;
  type: string;
  param: string | null;
  code: string | null;
}

export interface OpenAIErrorResponse {
  error: OpenAIErrorDetail;
}