@cavi-ai/api-client/providers/codex/files
Package subpath: ./providers/codex/files
CodexFileObject
Kind: type
export type CodexFileObject = {
id: string;
} & Record<string, unknown>;CodexFilesClient
Kind: class
/** Minimal OpenAI Files client (multipart upload + content download + retrieve/delete). */
export declare class CodexFilesClient extends BaseHttpApiClient {
readonly request: HttpApiTransport;
constructor(options: CodexFilesClientOptions);
/** Upload a file (multipart). `content` is the file text (e.g. batch input JSONL). */
uploadFile(content: string, purpose: string, filename?: string): Promise<CodexFileObject>;
/** Download raw file content (e.g. a batch output/error file's JSONL). */
downloadFileContent(fileId: string): Promise<string>;
retrieveFile(fileId: string): Promise<CodexFileObject>;
deleteFile(fileId: string): Promise<Record<string, unknown>>;
}CodexFilesClientOptions
Kind: type
export type CodexFilesClientOptions = {
/** OpenAI API key. Backend-owned. */
apiKey: string;
baseUrl?: string;
fetchImpl?: typeof fetch;
onTrace?: HttpApiClientOptions["onTrace"];
defaultTimeoutMs?: number;
};