Beta

beta

Beta

Chat

beta.chat

BetaChat

Completions

beta.chat.completions

Methods

Generate Chat Completion -> |
post/v4/beta/chat/completions

Description

Interact with the LLM model using a chat completions interface. The LLM model will respond with an assistant message.

{
    "model": "gpt-4o",
    "messages": [
        { "role": "system", "content": "You are a name generator. Do not generate anything else than names" },
        { "role": "user", "content": "Generate 5 names" },
    ]
}

Domain types

ChatCompletion = { choices, id, created, 4 more... }
ChatCompletionChunk = { choices, id, created, 4 more... }
ChatCompletionRequest = { messages, model, audio, 37 more... }
Beta

Completions

beta.completions

Methods

Generate Completion -> |
post/v4/beta/completions

Description

Interact with the LLM model using a completions interface. The LLM model will generate a text completion based on the provided prompt.

{
    "model": "gpt-4o",
    "prompt": "What is the capital of France?"
}

Domain types

Completion = { choices, id, created, 4 more... }
CompletionChunk = { choices, id, chunk_type, 6 more... }
CompletionRequest = { model, prompt, audio, 35 more... }
Beta

Files

beta.files

Methods

Get File Content -> unknown
get/v4/beta/files/{file_id}/content

Get File Content

Upload File ->
post/v4/beta/files

Upload File

Delete File ->
delete/v4/beta/files/{file_id}

Delete File

List Files -> CursorPage<>
get/v4/beta/files

List Files

Get File ->
get/v4/beta/files/{file_id}

Get File

Domain types

File = { id, created_at, created_by_user_id, 5 more... }
FileDelete = { id, deleted, object }
FileList = { has_more, items, total, 2 more... }