Functions

list-assistants

fn (request: ListAssistantsRequest): ListAssistantsResponse
fn (request: ListAssistantsRequest, opts: Map): ListAssistantsResponse

GET /assistants - List all assistants. Supports pagination with limit, order, after, and before parameters.

Example

page ::openai::list/list-assistants({limit: "20", order: "desc"})
map(page.data, %.id)
page.has_more

list-batch

fn (request: ListBatchesRequest): ListBatchesResponse
fn (request: ListBatchesRequest, opts: Map): ListBatchesResponse

GET /batches - List all batches. Supports pagination with after and limit parameters.

Example

page ::openai::list/list-batch({limit: "20"})
map(page.data, %.status)
page.has_more

list-chat-completions

fn (request: ListChatCompletionsRequest): ListChatCompletionsResponse
fn (request: ListChatCompletionsRequest, opts: Map): ListChatCompletionsResponse

GET /chat/completions - List stored chat completions. Supports filtering by model and metadata.

Example

page ::openai::list/list-chat-completions({
  model: "gpt-4o-mini",
  limit: "20",
  order: "desc"
})
map(page.data, %.id)
page.has_more

list-checkpoint-permissions

fn (request: ListFineTuningCheckpointPermissionsRequest): ListFineTuningCheckpointPermissionsResponse
fn (request: ListFineTuningCheckpointPermissionsRequest, opts: Map): ListFineTuningCheckpointPermissionsResponse

GET /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions - List checkpoint permissions

Example

page ::openai::list/list-checkpoint-permissions({
  fine-tuned-model-checkpoint: "ft:gpt-4o-mini-2024-07-18:acme::abc123:ckpt-step-100",
  limit: "20"
})
map(page.data, %.id)
page.has_more

list-evals

fn (request: ListEvalsRequest): ListEvalsResponse
fn (request: ListEvalsRequest, opts: Map): ListEvalsResponse

GET /evals - List all evaluations. Supports pagination and ordering.

Example

page ::openai::list/list-evals({limit: "20", order: "desc", order-by: "created_at"})
map(page.data, %.id)
page.has_more

list-files

fn (request: ListFilesRequest): ListFilesResponse
fn (request: ListFilesRequest, opts: Map): ListFilesResponse

GET /files - List uploaded files. Supports filtering by purpose.

Example

tenant {api-key: ::hot::ctx/get("tenant.openai.key")}
page ::openai::list/list-files({purpose: "assistants", limit: "20", order: "desc"}, tenant)
map(page.data, %.filename)

list-finetuning-checkpoints

fn (request: ListFineTuningJobCheckpointsRequest): ListFineTuningJobCheckpointsResponse
fn (request: ListFineTuningJobCheckpointsRequest, opts: Map): ListFineTuningJobCheckpointsResponse

GET /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints - List fine-tuning checkpoints

Example

page ::openai::list/list-finetuning-checkpoints({
  fine-tuning-job-id: "ftjob_abc123",
  limit: "10"
})
map(page.data, %.id)
page.has_more

list-finetuning-events

fn (request: ListFineTuningEventsRequest): ListFineTuningEventsResponse
fn (request: ListFineTuningEventsRequest, opts: Map): ListFineTuningEventsResponse

GET /fine_tuning/jobs/{fine_tuning_job_id}/events - List fine-tuning events

Example

page ::openai::list/list-finetuning-events({
  fine-tuning-job-id: "ftjob_abc123",
  limit: "50"
})
map(page.data, %.message)

list-finetuning-jobs

fn (request: ListPaginatedFineTuningJobsRequest): ListPaginatedFineTuningJobsResponse
fn (request: ListPaginatedFineTuningJobsRequest, opts: Map): ListPaginatedFineTuningJobsResponse

GET /fine_tuning/jobs - List all fine-tuning jobs. Supports pagination and metadata filtering.

Example

page ::openai::list/list-finetuning-jobs({limit: "10"})
map(page.data, %.status)
page.has_more

list-input-items

fn (request: ListInputItemsRequest): ListInputItemsResponse
fn (request: ListInputItemsRequest, opts: Map): ListInputItemsResponse

GET /responses/{response_id}/input_items - List input items for a response.

Example

page ::openai::list/list-input-items({
  response-id: "resp_abc123",
  limit: "20",
  order: "asc"
})
map(page.data, %.id)
page.has_more

list-messages

fn (request: ListMessagesRequest): ListMessagesResponse
fn (request: ListMessagesRequest, opts: Map): ListMessagesResponse

GET /threads/{thread_id}/messages - List all messages in a thread.

Example

page ::openai::list/list-messages({
  thread-id: "thread_abc123",
  limit: "20",
  order: "asc",
  run-id: "run_abc123"
})
map(page.data, %.content)

list-models

fn (request: ListModelsRequest): ListModelsResponse
fn (request: ListModelsRequest, opts: Map): ListModelsResponse

GET /models - List all available models.

For a more ergonomic API, see ::openai::models/list.

Example

models ::openai::list/list-models(::openai::list/ListModelsRequest({}))
first-model first(models.data)
first-model.id // => "gpt-4o-mini"

list-organization-certificates

fn (request: ListOrganizationCertificatesRequest): ListOrganizationCertificatesResponse
fn (request: ListOrganizationCertificatesRequest, opts: Map): ListOrganizationCertificatesResponse

GET /organization/certificates - List organization certificates

Example

page ::openai::list/list-organization-certificates({limit: "20", order: "desc"})
map(page.data, %.id)
page.has_more

list-project-certificates

fn (request: ListProjectCertificatesRequest): ListProjectCertificatesResponse
fn (request: ListProjectCertificatesRequest, opts: Map): ListProjectCertificatesResponse

GET /organization/projects/{project_id}/certificates - List project certificates

Example

page ::openai::list/list-project-certificates({project-id: "proj_abc123", limit: "20"})
map(page.data, %.id)
page.has_more

list-run-steps

fn (request: ListRunStepsRequest): ListRunStepsResponse
fn (request: ListRunStepsRequest, opts: Map): ListRunStepsResponse

GET /threads/{thread_id}/runs/{run_id}/steps - List all steps in a run.

Example

page ::openai::list/list-run-steps({
  thread-id: "thread_abc123",
  run-id: "run_abc123",
  limit: "20"
})
map(page.data, %.type)

list-runs

fn (request: ListRunsRequest): ListRunsResponse
fn (request: ListRunsRequest, opts: Map): ListRunsResponse

GET /threads/{thread_id}/runs - List all runs in a thread.

Example

page ::openai::list/list-runs({thread-id: "thread_abc123", limit: "20", order: "desc"})
map(page.data, %.status)

list-vector-store-files

fn (request: ListVectorStoreFilesRequest): ListVectorStoreFilesResponse
fn (request: ListVectorStoreFilesRequest, opts: Map): ListVectorStoreFilesResponse

GET /vector_stores/{vector_store_id}/files - List all files in a vector store.

Example

page ::openai::list/list-vector-store-files({
  vector-store-id: "vs_abc123",
  limit: "20",
  filter: "completed"
})
map(page.data, %.id)
page.has_more

list-vector-store-files-batch

fn (request: ListFilesInVectorStoreBatchRequest): ListFilesInVectorStoreBatchResponse
fn (request: ListFilesInVectorStoreBatchRequest, opts: Map): ListFilesInVectorStoreBatchResponse

GET /vector_stores/{vector_store_id}/file_batches/{batch_id}/files - List vector store files in a batch

Example

page ::openai::list/list-vector-store-files-batch({
  vector-store-id: "vs_abc123",
  batch-id: "vsfb_abc123",
  limit: "20",
  filter: "completed"
})
map(page.data, %.id)
page.has_more

list-vector-stores

fn (request: ListVectorStoresRequest): ListVectorStoresResponse
fn (request: ListVectorStoresRequest, opts: Map): ListVectorStoresResponse

GET /vector_stores - List all vector stores. Supports pagination.

Example

page ::openai::list/list-vector-stores({limit: "20", order: "desc"})
map(page.data, %.id)
page.has_more

Types

AssistantObject

AssistantObject type {
    id: Str,
    object: "assistant",
    created_at: Int,
    name: Str?,
    description: Str?,
    model: Str,
    instructions: Str?,
    tools: Vec<AssistantTool>,
    tool_resources: Map?,
    metadata: Metadata?,
    temperature: Dec?,
    top_p: Dec?,
    response_format: AssistantsApiResponseFormatOption?
}

AssistantTool

AssistantTool type Map

AssistantsApiResponseFormatOption

AssistantsApiResponseFormatOption type Any

Batch

Batch type {
    id: Str,
    object: "batch",
    endpoint: Str,
    errors: Map?,
    input_file_id: Str,
    completion_window: Str,
    status: BatchStatus,
    output_file_id: Str?,
    error_file_id: Str?,
    created_at: Int,
    in_progress_at: Int?,
    expires_at: Int?,
    finalizing_at: Int?,
    completed_at: Int?,
    failed_at: Int?,
    expired_at: Int?,
    cancelling_at: Int?,
    cancelled_at: Int?,
    request_counts: BatchRequestCounts?,
    metadata: Metadata?
}

BatchRequestCounts

BatchRequestCounts type {
    total: Int,
    completed: Int,
    failed: Int
}

BatchStatus

BatchStatus type "validating" | "failed" | "in_progress" | "finalizing" | "completed" | "expired" | "cancelling" | "cancelled"

Certificate

Certificate type {
    object: CertificateObjectType,
    id: Str,
    name: Str?,
    created_at: Int,
    certificate_details: Map,
    active: Bool?
}

CertificateObjectType

CertificateObjectType type "certificate" | "organization.certificate" | "organization.project.certificate"

ChatCompletionList

ChatCompletionList type {
    object: "list",
    data: Vec<CreateChatCompletionResponse>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ChunkingStrategyResponse

ChunkingStrategyResponse type Map

CompletionUsage

CompletionUsage type {
    completion_tokens: Int,
    prompt_tokens: Int,
    total_tokens: Int,
    completion_tokens_details: Map?,
    prompt_tokens_details: Map?
}

CreateChatCompletionResponse

CreateChatCompletionResponse type {
    id: Str,
    choices: Vec<Map>,
    created: Int,
    model: Str,
    service_tier: ServiceTier?,
    system_fingerprint: Str?,
    object: "chat.completion",
    usage: CompletionUsage?
}

Eval

Eval type {
    object: "eval",
    id: Str,
    name: Str?,
    data_source_config: Map,
    testing_criteria: Vec,
    created_at: Int,
    metadata: Metadata?
}

EvalList

EvalList type {
    object: "list",
    data: Vec<Eval>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

FineTuneDPOHyperparameters

FineTuneDPOHyperparameters type {
    beta: Any?,
    batch_size: Any?,
    learning_rate_multiplier: Any?,
    n_epochs: Any?
}

FineTuneDPOMethod

FineTuneDPOMethod type {
    hyperparameters: FineTuneDPOHyperparameters?
}

FineTuneMethod

FineTuneMethod type {
    type: FineTuneMethodType,
    supervised: FineTuneSupervisedMethod?,
    dpo: FineTuneDPOMethod?,
    reinforcement: FineTuneReinforcementMethod?
}

FineTuneMethodType

FineTuneMethodType type "supervised" | "dpo" | "reinforcement"

FineTuneReasoningEffort

FineTuneReasoningEffort type "default" | "low" | "medium" | "high"

FineTuneReinforcementHyperparameters

FineTuneReinforcementHyperparameters type {
    batch_size: Any?,
    learning_rate_multiplier: Any?,
    n_epochs: Any?,
    reasoning_effort: FineTuneReasoningEffort?,
    compute_multiplier: Any?,
    eval_interval: Any?,
    eval_samples: Any?
}

FineTuneReinforcementMethod

FineTuneReinforcementMethod type {
    grader: Map,
    hyperparameters: FineTuneReinforcementHyperparameters?
}

FineTuneSupervisedHyperparameters

FineTuneSupervisedHyperparameters type {
    batch_size: Any?,
    learning_rate_multiplier: Any?,
    n_epochs: Any?
}

FineTuneSupervisedMethod

FineTuneSupervisedMethod type {
    hyperparameters: FineTuneSupervisedHyperparameters?
}

FineTuningCheckpointPermission

FineTuningCheckpointPermission type {
    id: Str,
    created_at: Int,
    project_id: Str,
    object: "checkpoint.permission"
}

FineTuningJob

FineTuningJob type {
    id: Str,
    created_at: Int,
    error: Map?,
    fine_tuned_model: Str?,
    finished_at: Int?,
    hyperparameters: Map,
    model: Str,
    object: "fine_tuning.job",
    organization_id: Str,
    result_files: Vec<Str>,
    status: FineTuningJobStatus,
    trained_tokens: Int?,
    training_file: Str,
    validation_file: Str?,
    integrations: Vec?,
    seed: Int,
    estimated_finish: Int?,
    method: FineTuneMethod?,
    metadata: Metadata?
}

FineTuningJobCheckpoint

FineTuningJobCheckpoint type {
    id: Str,
    created_at: Int,
    fine_tuned_model_checkpoint: Str,
    step_number: Int,
    metrics: Map,
    fine_tuning_job_id: Str,
    object: "fine_tuning.job.checkpoint"
}

FineTuningJobEvent

FineTuningJobEvent type {
    object: "fine_tuning.job.event",
    id: Str,
    created_at: Int,
    level: FineTuningJobEventLevel,
    message: Str,
    type: FineTuningJobEventType?,
    data: Map?
}

FineTuningJobEventLevel

FineTuningJobEventLevel type "info" | "warn" | "error"

FineTuningJobEventType

FineTuningJobEventType type "message" | "metrics"

FineTuningJobStatus

FineTuningJobStatus type "validating_files" | "queued" | "running" | "succeeded" | "failed" | "cancelled"

ItemResource

ItemResource type Map

ListAssistantsRequest

ListAssistantsRequest type {
    limit: Str,
    order: Str,
    after: Str,
    before: Str
}

ListAssistantsResponse

ListAssistantsResponse type {
    object: Str,
    data: Vec<AssistantObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListAssistantsResponse

ListAssistantsResponse type {
    object: Str,
    data: Vec<AssistantObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListBatchesRequest

ListBatchesRequest type {
    after: Str,
    limit: Str
}

ListBatchesResponse

ListBatchesResponse type {
    data: Vec<Batch>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool,
    object: "list"
}

ListBatchesResponse

ListBatchesResponse type {
    data: Vec<Batch>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool,
    object: "list"
}

ListCertificatesResponse

ListCertificatesResponse type {
    data: Vec<Certificate>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool,
    object: "list"
}

ListChatCompletionsRequest

ListChatCompletionsRequest type {
    model: Str,
    metadata: Str,
    after: Str,
    limit: Str,
    order: Str
}

ListChatCompletionsResponse

ListChatCompletionsResponse type {
    object: "list",
    data: Vec<CreateChatCompletionResponse>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListEvalsRequest

ListEvalsRequest type {
    after: Str,
    limit: Str,
    order: Str,
    order-by: Str
}

ListEvalsResponse

ListEvalsResponse type {
    object: "list",
    data: Vec<Eval>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFilesInVectorStoreBatchRequest

ListFilesInVectorStoreBatchRequest type {
    vector-store-id: Str,
    batch-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str,
    filter: Str
}

ListFilesInVectorStoreBatchResponse

ListFilesInVectorStoreBatchResponse type {
    object: Str,
    data: Vec<VectorStoreFileObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFilesRequest

ListFilesRequest type {
    purpose: Str,
    limit: Str,
    order: Str,
    after: Str
}

ListFilesResponse

ListFilesResponse type {
    object: Str,
    data: Vec<OpenAIFile>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListFilesResponse

ListFilesResponse type {
    object: Str,
    data: Vec<OpenAIFile>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFineTuningCheckpointPermissionResponse

ListFineTuningCheckpointPermissionResponse type {
    data: Vec<FineTuningCheckpointPermission>,
    object: "list",
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFineTuningCheckpointPermissionsRequest

ListFineTuningCheckpointPermissionsRequest type {
    fine-tuned-model-checkpoint: Str,
    project-id: Str,
    after: Str,
    limit: Str,
    order: Str
}

ListFineTuningCheckpointPermissionsResponse

ListFineTuningCheckpointPermissionsResponse type {
    data: Vec<FineTuningCheckpointPermission>,
    object: "list",
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFineTuningEventsRequest

ListFineTuningEventsRequest type {
    fine-tuning-job-id: Str,
    after: Str,
    limit: Str
}

ListFineTuningEventsResponse

ListFineTuningEventsResponse type {
    data: Vec<FineTuningJobEvent>,
    object: "list",
    has_more: Bool
}

ListFineTuningJobCheckpointsRequest

ListFineTuningJobCheckpointsRequest type {
    fine-tuning-job-id: Str,
    after: Str,
    limit: Str
}

ListFineTuningJobCheckpointsResponse

ListFineTuningJobCheckpointsResponse type {
    data: Vec<FineTuningJobCheckpoint>,
    object: "list",
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFineTuningJobCheckpointsResponse

ListFineTuningJobCheckpointsResponse type {
    data: Vec<FineTuningJobCheckpoint>,
    object: "list",
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListFineTuningJobEventsResponse

ListFineTuningJobEventsResponse type {
    data: Vec<FineTuningJobEvent>,
    object: "list",
    has_more: Bool
}

ListInputItemsRequest

ListInputItemsRequest type {
    response-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str,
    include: Str
}

ListInputItemsResponse

ListInputItemsResponse type {
    object: Any,
    data: Vec<ItemResource>,
    has_more: Bool,
    first_id: Str?,
    last_id: Str?
}

ListMessagesRequest

ListMessagesRequest type {
    thread-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str,
    run-id: Str
}

ListMessagesResponse

ListMessagesResponse type {
    object: Str,
    data: Vec<MessageObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListMessagesResponse

ListMessagesResponse type {
    object: Str,
    data: Vec<MessageObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListModelsRequest

ListModelsRequest type Map

ListModelsResponse

ListModelsResponse type {
    object: "list",
    data: Vec<Model>
}

ListModelsResponse

ListModelsResponse type {
    object: "list",
    data: Vec<Model>
}

ListOrganizationCertificatesRequest

ListOrganizationCertificatesRequest type {
    limit: Str,
    after: Str,
    order: Str
}

ListOrganizationCertificatesResponse

ListOrganizationCertificatesResponse type {
    data: Vec<Certificate>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool,
    object: "list"
}

ListPaginatedFineTuningJobsRequest

ListPaginatedFineTuningJobsRequest type {
    after: Str,
    limit: Str,
    metadata: Str
}

ListPaginatedFineTuningJobsResponse

ListPaginatedFineTuningJobsResponse type {
    data: Vec<FineTuningJob>,
    has_more: Bool,
    object: "list"
}

ListPaginatedFineTuningJobsResponse

ListPaginatedFineTuningJobsResponse type {
    data: Vec<FineTuningJob>,
    has_more: Bool,
    object: "list"
}

ListProjectCertificatesRequest

ListProjectCertificatesRequest type {
    project-id: Str,
    limit: Str,
    after: Str,
    order: Str
}

ListProjectCertificatesResponse

ListProjectCertificatesResponse type {
    data: Vec<Certificate>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool,
    object: "list"
}

ListRunStepsRequest

ListRunStepsRequest type {
    thread-id: Str,
    run-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str,
    include: Str
}

ListRunStepsResponse

ListRunStepsResponse type {
    object: Str,
    data: Vec<RunStepObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListRunStepsResponse

ListRunStepsResponse type {
    object: Str,
    data: Vec<RunStepObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListRunsRequest

ListRunsRequest type {
    thread-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str
}

ListRunsResponse

ListRunsResponse type {
    object: Str,
    data: Vec<RunObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListRunsResponse

ListRunsResponse type {
    object: Str,
    data: Vec<RunObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListVectorStoreFilesRequest

ListVectorStoreFilesRequest type {
    vector-store-id: Str,
    limit: Str,
    order: Str,
    after: Str,
    before: Str,
    filter: Str
}

ListVectorStoreFilesResponse

ListVectorStoreFilesResponse type {
    object: Str,
    data: Vec<VectorStoreFileObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListVectorStoreFilesResponse

ListVectorStoreFilesResponse type {
    object: Str,
    data: Vec<VectorStoreFileObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

ListVectorStoresRequest

ListVectorStoresRequest type {
    limit: Str,
    order: Str,
    after: Str,
    before: Str
}

ListVectorStoresResponse

ListVectorStoresResponse type {
    object: Str,
    data: Vec<VectorStoreObject>,
    first_id: Str,
    last_id: Str,
    has_more: Bool
}

ListVectorStoresResponse

ListVectorStoresResponse type {
    object: Str,
    data: Vec<VectorStoreObject>,
    first_id: Str?,
    last_id: Str?,
    has_more: Bool
}

MessageContent

MessageContent type Any

MessageObject

MessageObject type {
    id: Str,
    object: "thread.message",
    created_at: Int,
    thread_id: Str,
    status: MessageStatus,
    incomplete_details: Map?,
    completed_at: Int?,
    incomplete_at: Int?,
    role: MessageRole,
    content: Vec<MessageContent>,
    assistant_id: Str?,
    run_id: Str?,
    attachments: Vec<Map>?,
    metadata: Metadata?
}

MessageRole

MessageRole type "user" | "assistant"

MessageStatus

MessageStatus type "in_progress" | "incomplete" | "completed"

Metadata

Metadata type Map

Model

Model type {
    id: Str,
    created: Int,
    object: "model",
    owned_by: Str
}

OpenAIFile

OpenAIFile type {
    id: Str,
    bytes: Int,
    created_at: Int,
    expires_at: Int?,
    filename: Str,
    object: "file",
    purpose: OpenAIFilePurpose,
    status: OpenAIFileStatus,
    status_details: Str?
}

OpenAIFilePurpose

OpenAIFilePurpose type "assistants" | "assistants_output" | "batch" | "batch_output" | "fine-tune" | "fine-tune-results" | "vision" | "user_data"

OpenAIFileStatus

OpenAIFileStatus type "uploaded" | "processed" | "error"

ParallelToolCalls

ParallelToolCalls type Bool

ResponseItemList

ResponseItemList type {
    object: Any,
    data: Vec<ItemResource>,
    has_more: Bool,
    first_id: Str,
    last_id: Str
}

RunCompletionUsage

RunCompletionUsage type {
    completion_tokens: Int,
    prompt_tokens: Int,
    total_tokens: Int
}

RunObject

RunObject type {
    id: Str,
    object: "thread.run",
    created_at: Int,
    thread_id: Str,
    assistant_id: Str?,
    status: RunStatus,
    required_action: Map?,
    last_error: Map?,
    expires_at: Int?,
    started_at: Int?,
    cancelled_at: Int?,
    failed_at: Int?,
    completed_at: Int?,
    incomplete_details: Map?,
    model: Str,
    instructions: Str?,
    tools: Vec<AssistantTool>,
    metadata: Metadata?,
    usage: RunCompletionUsage?,
    temperature: Dec?,
    top_p: Dec?,
    max_prompt_tokens: Int?,
    max_completion_tokens: Int?,
    truncation_strategy: Any,
    tool_choice: Any,
    parallel_tool_calls: ParallelToolCalls,
    response_format: AssistantsApiResponseFormatOption
}

RunStatus

RunStatus type Str

RunStepCompletionUsage

RunStepCompletionUsage type {
    completion_tokens: Int,
    prompt_tokens: Int,
    total_tokens: Int
}

RunStepObject

RunStepObject type {
    id: Str,
    object: "thread.run.step",
    created_at: Int,
    assistant_id: Str?,
    thread_id: Str,
    run_id: Str?,
    type: RunStepType,
    status: RunStepStatus,
    step_details: Map,
    last_error: Map?,
    expired_at: Int?,
    cancelled_at: Int?,
    failed_at: Int?,
    completed_at: Int?,
    metadata: Metadata?,
    usage: RunStepCompletionUsage?
}

RunStepStatus

RunStepStatus type "in_progress" | "cancelled" | "failed" | "completed" | "expired"

RunStepType

RunStepType type "message_creation" | "tool_calls"

ServiceTier

ServiceTier type Str

VectorStoreExpirationAfter

VectorStoreExpirationAfter type {
    anchor: "last_active_at",
    days: Int
}

VectorStoreFileAttributes

VectorStoreFileAttributes type Map

VectorStoreFileObject

VectorStoreFileObject type {
    id: Str,
    object: "vector_store.file",
    usage_bytes: Int,
    created_at: Int,
    vector_store_id: Str,
    status: VectorStoreFileStatus,
    last_error: Map?,
    chunking_strategy: ChunkingStrategyResponse?,
    attributes: VectorStoreFileAttributes?
}

VectorStoreFileStatus

VectorStoreFileStatus type "in_progress" | "completed" | "cancelled" | "failed"

VectorStoreObject

VectorStoreObject type {
    id: Str,
    object: "vector_store",
    created_at: Int,
    name: Str?,
    usage_bytes: Int,
    file_counts: Map,
    status: VectorStoreStatus,
    expires_after: VectorStoreExpirationAfter?,
    expires_at: Int?,
    last_active_at: Int?,
    metadata: Metadata?
}

VectorStoreStatus

VectorStoreStatus type "expired" | "in_progress" | "completed"