// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; export class Models extends APIResource { /** * Get a specific model */ retrieve(model: string, options?: RequestOptions): APIPromise { return this._client.get(path`/openai/v1/models/${model}`, options); } /** * get all available models */ list(options?: RequestOptions): APIPromise { return this._client.get('/openai/v1/models', options); } /** * Delete a model */ delete(model: string, options?: RequestOptions): APIPromise { return this._client.delete(path`/openai/v1/models/${model}`, options); } } /** * Describes an OpenAI model offering that can be used with the API. */ export interface Model { /** * The model identifier, which can be referenced in the API endpoints. */ id: string; /** * The Unix timestamp (in seconds) when the model was created. */ created: number; /** * The object type, which is always "model". */ object: 'model'; /** * The organization that owns the model. */ owned_by: string; } export interface ModelDeleted { id: string; deleted: boolean; object: string; } export interface ModelListResponse { data: Array; object: 'list'; } export declare namespace Models { export { type Model as Model, type ModelDeleted as ModelDeleted, type ModelListResponse as ModelListResponse, }; }