# Shared
Types:
- ErrorObject
- FunctionDefinition
- FunctionParameters
- ResponseFormatJSONObject
- ResponseFormatJSONSchema
- ResponseFormatText
# Completions
Types:
- Completion
- CompletionChoice
- CompletionUsage
Methods:
- client.completions.create({ ...params }) -> Completion
# Chat
Types:
- ChatModel
## Completions
Types:
- ChatCompletion
- ChatCompletionAssistantMessageParam
- ChatCompletionChunk
- ChatCompletionContentPart
- ChatCompletionContentPartImage
- ChatCompletionContentPartRefusal
- ChatCompletionContentPartText
- ChatCompletionFunctionCallOption
- ChatCompletionFunctionMessageParam
- ChatCompletionMessage
- ChatCompletionMessageParam
- ChatCompletionMessageToolCall
- ChatCompletionNamedToolChoice
- ChatCompletionRole
- ChatCompletionStreamOptions
- ChatCompletionSystemMessageParam
- ChatCompletionTokenLogprob
- ChatCompletionTool
- ChatCompletionToolChoiceOption
- ChatCompletionToolMessageParam
- ChatCompletionUserMessageParam
- CreateChatCompletionRequestMessage
Methods:
- client.chat.completions.create({ ...params }) -> ChatCompletion
# Embeddings
Types:
- CreateEmbeddingResponse
- Embedding
Methods:
- client.embeddings.create({ ...params }) -> CreateEmbeddingResponse
# Files
Types:
- FileContent
- FileDeleted
- FileObject
- FilePurpose
Methods:
- client.files.create({ ...params }) -> FileObject
- client.files.retrieve(fileId) -> FileObject
- client.files.list({ ...params }) -> FileObjectsPage
- client.files.del(fileId) -> FileDeleted
- client.files.content(fileId) -> Response
- client.files.retrieveContent(fileId) -> string
- client.files.waitForProcessing(id, { pollInterval = 5000, maxWait = 30 _ 60 _ 1000 }) -> Promise<FileObject>
# Images
Types:
- Image
- ImageModel
- ImagesResponse
Methods:
- client.images.createVariation({ ...params }) -> ImagesResponse
- client.images.edit({ ...params }) -> ImagesResponse
- client.images.generate({ ...params }) -> ImagesResponse
# Audio
Types:
- AudioModel
## Transcriptions
Types:
- Transcription
Methods:
- client.audio.transcriptions.create({ ...params }) -> Transcription
## Translations
Types:
- Translation
Methods:
- client.audio.translations.create({ ...params }) -> Translation
## Speech
Types:
- SpeechModel
Methods:
- client.audio.speech.create({ ...params }) -> Response
# Moderations
Types:
- Moderation
- ModerationModel
- ModerationCreateResponse
Methods:
- client.moderations.create({ ...params }) -> ModerationCreateResponse
# Models
Types:
- Model
- ModelDeleted
Methods:
- client.models.retrieve(model) -> Model
- client.models.list() -> ModelsPage
- client.models.del(model) -> ModelDeleted
# FineTuning
## Jobs
Types:
- FineTuningJob
- FineTuningJobEvent
- FineTuningJobIntegration
- FineTuningJobWandbIntegration
- FineTuningJobWandbIntegrationObject
Methods:
- client.fineTuning.jobs.create({ ...params }) -> FineTuningJob
- client.fineTuning.jobs.retrieve(fineTuningJobId) -> FineTuningJob
- client.fineTuning.jobs.list({ ...params }) -> FineTuningJobsPage
- client.fineTuning.jobs.cancel(fineTuningJobId) -> FineTuningJob
- client.fineTuning.jobs.listEvents(fineTuningJobId, { ...params }) -> FineTuningJobEventsPage
### Checkpoints
Types:
- FineTuningJobCheckpoint
Methods:
- client.fineTuning.jobs.checkpoints.list(fineTuningJobId, { ...params }) -> FineTuningJobCheckpointsPage
# Beta
## VectorStores
Types:
- VectorStore
- VectorStoreDeleted
Methods:
- client.beta.vectorStores.create({ ...params }) -> VectorStore
- client.beta.vectorStores.retrieve(vectorStoreId) -> VectorStore
- client.beta.vectorStores.update(vectorStoreId, { ...params }) -> VectorStore
- client.beta.vectorStores.list({ ...params }) -> VectorStoresPage
- client.beta.vectorStores.del(vectorStoreId) -> VectorStoreDeleted
### Files
Types:
- VectorStoreFile
- VectorStoreFileDeleted
Methods:
- client.beta.vectorStores.files.create(vectorStoreId, { ...params }) -> VectorStoreFile
- client.beta.vectorStores.files.retrieve(vectorStoreId, fileId) -> VectorStoreFile
- client.beta.vectorStores.files.list(vectorStoreId, { ...params }) -> VectorStoreFilesPage
- client.beta.vectorStores.files.del(vectorStoreId, fileId) -> VectorStoreFileDeleted
- client.beta.vectorStores.files.createAndPoll(vectorStoreId, body, options?) -> Promise<VectorStoreFile>
- client.beta.vectorStores.files.poll(vectorStoreId, fileId, options?) -> Promise<VectorStoreFile>
- client.beta.vectorStores.files.upload(vectorStoreId, file, options?) -> Promise<VectorStoreFile>
- client.beta.vectorStores.files.uploadAndPoll(vectorStoreId, file, options?) -> Promise<VectorStoreFile>
### FileBatches
Types:
- VectorStoreFileBatch
Methods:
- client.beta.vectorStores.fileBatches.create(vectorStoreId, { ...params }) -> VectorStoreFileBatch
- client.beta.vectorStores.fileBatches.retrieve(vectorStoreId, batchId) -> VectorStoreFileBatch
- client.beta.vectorStores.fileBatches.cancel(vectorStoreId, batchId) -> VectorStoreFileBatch
- client.beta.vectorStores.fileBatches.listFiles(vectorStoreId, batchId, { ...params }) -> VectorStoreFilesPage
- client.beta.vectorStores.fileBatches.createAndPoll(vectorStoreId, body, options?) -> Promise<VectorStoreFileBatch>
- client.beta.vectorStores.fileBatches.poll(vectorStoreId, batchId, options?) -> Promise<VectorStoreFileBatch>
- client.beta.vectorStores.fileBatches.uploadAndPoll(vectorStoreId, { files, fileIds = [] }, options?) -> Promise<VectorStoreFileBatch>
## Chat
### Completions
Methods:
- client.beta.chat.completions.runFunctions(body, options?) -> ChatCompletionRunner | ChatCompletionStreamingRunner
- client.beta.chat.completions.runTools(body, options?) -> ChatCompletionRunner | ChatCompletionStreamingRunner
- client.beta.chat.completions.stream(body, options?) -> ChatCompletionStream
## Assistants
Types:
- Assistant
- AssistantDeleted
- AssistantStreamEvent
- AssistantTool
- CodeInterpreterTool
- FileSearchTool
- FunctionTool
- MessageStreamEvent
- RunStepStreamEvent
- RunStreamEvent
- ThreadStreamEvent
Methods:
- client.beta.assistants.create({ ...params }) -> Assistant
- client.beta.assistants.retrieve(assistantId) -> Assistant
- client.beta.assistants.update(assistantId, { ...params }) -> Assistant
- client.beta.assistants.list({ ...params }) -> AssistantsPage
- client.beta.assistants.del(assistantId) -> AssistantDeleted
## Threads
Types:
- AssistantResponseFormatOption
- AssistantToolChoice
- AssistantToolChoiceFunction
- AssistantToolChoiceOption
- Thread
- ThreadDeleted
Methods:
- client.beta.threads.create({ ...params }) -> Thread
- client.beta.threads.retrieve(threadId) -> Thread
- client.beta.threads.update(threadId, { ...params }) -> Thread
- client.beta.threads.del(threadId) -> ThreadDeleted
- client.beta.threads.createAndRun({ ...params }) -> Run
- client.beta.threads.createAndRunPoll(body, options?) -> Promise<Threads.Run>
- client.beta.threads.createAndRunStream(body, options?) -> AssistantStream
### Runs
Types:
- RequiredActionFunctionToolCall
- Run
- RunStatus
Methods:
- client.beta.threads.runs.create(threadId, { ...params }) -> Run
- client.beta.threads.runs.retrieve(threadId, runId) -> Run
- client.beta.threads.runs.update(threadId, runId, { ...params }) -> Run
- client.beta.threads.runs.list(threadId, { ...params }) -> RunsPage
- client.beta.threads.runs.cancel(threadId, runId) -> Run
- client.beta.threads.runs.submitToolOutputs(threadId, runId, { ...params }) -> Run
- client.beta.threads.runs.createAndPoll(threadId, body, options?) -> Promise<Run>
- client.beta.threads.runs.createAndStream(threadId, body, options?) -> AssistantStream
- client.beta.threads.runs.poll(threadId, runId, options?) -> Promise<Run>
- client.beta.threads.runs.stream(threadId, body, options?) -> AssistantStream
- client.beta.threads.runs.submitToolOutputsAndPoll(threadId, runId, body, options?) -> Promise<Run>
- client.beta.threads.runs.submitToolOutputsStream(threadId, runId, body, options?) -> AssistantStream
#### Steps
Types:
- CodeInterpreterLogs
- CodeInterpreterOutputImage
- CodeInterpreterToolCall
- CodeInterpreterToolCallDelta
- FileSearchToolCall
- FileSearchToolCallDelta
- FunctionToolCall
- FunctionToolCallDelta
- MessageCreationStepDetails
- RunStep
- RunStepDelta
- RunStepDeltaEvent
- RunStepDeltaMessageDelta
- RunStepInclude
- ToolCall
- ToolCallDelta
- ToolCallDeltaObject
- ToolCallsStepDetails
Methods:
- client.beta.threads.runs.steps.retrieve(threadId, runId, stepId, { ...params }) -> RunStep
- client.beta.threads.runs.steps.list(threadId, runId, { ...params }) -> RunStepsPage
### Messages
Types:
- Annotation
- AnnotationDelta
- FileCitationAnnotation
- FileCitationDeltaAnnotation
- FilePathAnnotation
- FilePathDeltaAnnotation
- ImageFile
- ImageFileContentBlock
- ImageFileDelta
- ImageFileDeltaBlock
- ImageURL
- ImageURLContentBlock
- ImageURLDelta
- ImageURLDeltaBlock
- Message
- MessageContent
- MessageContentDelta
- MessageContentPartParam
- MessageDeleted
- MessageDelta
- MessageDeltaEvent
- RefusalContentBlock
- RefusalDeltaBlock
- Text
- TextContentBlock
- TextContentBlockParam
- TextDelta
- TextDeltaBlock
Methods:
- client.beta.threads.messages.create(threadId, { ...params }) -> Message
- client.beta.threads.messages.retrieve(threadId, messageId) -> Message
- client.beta.threads.messages.update(threadId, messageId, { ...params }) -> Message
- client.beta.threads.messages.list(threadId, { ...params }) -> MessagesPage
- client.beta.threads.messages.del(threadId, messageId) -> MessageDeleted
# Batches
Types:
- Batch
- BatchError
- BatchRequestCounts
Methods:
- client.batches.create({ ...params }) -> Batch
- client.batches.retrieve(batchId) -> Batch
- client.batches.list({ ...params }) -> BatchesPage
- client.batches.cancel(batchId) -> Batch
# Uploads
Types:
- Upload
Methods:
- client.uploads.create({ ...params }) -> Upload
- client.uploads.cancel(uploadId) -> Upload
- client.uploads.complete(uploadId, { ...params }) -> Upload
## Parts
Types:
- UploadPart
Methods:
- client.uploads.parts.create(uploadId, { ...params }) -> UploadPart