Functions
cancel-batch
fn (request: CancelBatchRequest): CancelBatchResponse
fn (request: CancelBatchRequest, opts: Map): CancelBatchResponse
POST /batches/{batch_id}/cancel - Cancel an in-progress batch. The batch status will change to "cancelling".
Example
batch ::openai::cancel/cancel-batch(::openai::cancel/CancelBatchRequest({
batch-id: "batch_abc123"
}))
batch.status
cancel-eval-run
fn (request: CancelEvalRunRequest): CancelEvalRunResponse
fn (request: CancelEvalRunRequest, opts: Map): CancelEvalRunResponse
POST /evals/{eval_id}/runs/{run_id} - Cancel an in-progress evaluation run.
Example
eval-run ::openai::cancel/cancel-eval-run(::openai::cancel/CancelEvalRunRequest({
eval-id: "eval_abc123",
run-id: "evalrun_abc123"
}))
eval-run.status
cancel-finetuning
fn (request: CancelFineTuningJobRequest): CancelFineTuningJobResponse
fn (request: CancelFineTuningJobRequest, opts: Map): CancelFineTuningJobResponse
POST /fine_tuning/jobs/{fine_tuning_job_id}/cancel - Cancel an in-progress fine-tuning job.
Example
job ::openai::cancel/cancel-finetuning(::openai::cancel/CancelFineTuningJobRequest({
fine-tuning-job-id: "ftjob_abc123"
}))
job.status
cancel-response
fn (request: CancelResponseRequest): CancelResponseResponse
fn (request: CancelResponseRequest, opts: Map): CancelResponseResponse
POST /responses/{response_id}/cancel - Cancel an in-progress model response.
Example
response ::openai::cancel/cancel-response(::openai::cancel/CancelResponseRequest({
response-id: "resp_abc123"
}))
response.status
cancel-run
fn (request: CancelRunRequest): CancelRunResponse
fn (request: CancelRunRequest, opts: Map): CancelRunResponse
POST /threads/{thread_id}/runs/{run_id}/cancel - Cancel an in-progress assistant run.
Example
run ::openai::cancel/cancel-run(::openai::cancel/CancelRunRequest({
thread-id: "thread_abc123",
run-id: "run_abc123"
}))
run.status
cancel-upload
fn (request: CancelUploadRequest): CancelUploadResponse
fn (request: CancelUploadRequest, opts: Map): CancelUploadResponse
POST /uploads/{upload_id}/cancel - Cancel an in-progress multi-part upload.
Example
upload ::openai::cancel/cancel-upload(::openai::cancel/CancelUploadRequest({
upload-id: "upload_abc123"
}))
upload.status
cancel-vector-store-file-batch
fn (request: CancelVectorStoreFileBatchRequest): CancelVectorStoreFileBatchResponse
fn (request: CancelVectorStoreFileBatchRequest, opts: Map): CancelVectorStoreFileBatchResponse
POST /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel - Cancel vector store file batch
Example
file-batch ::openai::cancel/cancel-vector-store-file-batch(::openai::cancel/CancelVectorStoreFileBatchRequest({
vector-store-id: "vs_abc123",
batch-id: "vsfb_abc123"
}))
file-batch.file_counts
Types
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"
CancelBatchRequest
CancelBatchRequest type {
batch-id: Str
}
CancelBatchResponse
CancelBatchResponse 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?
}
CancelEvalRunRequest
CancelEvalRunRequest type {
eval-id: Str,
run-id: Str
}
CancelEvalRunResponse
CancelEvalRunResponse type {
object: "eval.run",
id: Str,
eval_id: Str,
status: Str,
model: Str,
name: Str?,
created_at: Int,
report_url: Str?,
result_counts: Map,
per_model_usage: Vec<Map>,
per_testing_criteria_results: Vec<Map>,
data_source: Map,
metadata: Metadata?,
error: EvalApiError?
}
CancelFineTuningJobRequest
CancelFineTuningJobRequest type {
fine-tuning-job-id: Str
}
CancelFineTuningJobResponse
CancelFineTuningJobResponse 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?
}
CancelResponseRequest
CancelResponseRequest type {
response-id: Str
}
CancelResponseResponse
CancelResponseResponse type Map
CancelRunRequest
CancelRunRequest type {
thread-id: Str,
run-id: Str
}
CancelRunResponse
CancelRunResponse 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
}
CancelUploadRequest
CancelUploadRequest type {
upload-id: Str
}
CancelUploadResponse
CancelUploadResponse type {
id: Str,
created_at: Int,
filename: Str,
bytes: Int,
purpose: Str,
status: UploadStatus,
expires_at: Int?,
object: "upload",
file: Any?
}
CancelVectorStoreFileBatchRequest
CancelVectorStoreFileBatchRequest type {
vector-store-id: Str,
batch-id: Str
}
CancelVectorStoreFileBatchResponse
CancelVectorStoreFileBatchResponse type {
id: Str,
object: "vector_store.files_batch",
created_at: Int,
vector_store_id: Str,
status: VectorStoreFileBatchStatus,
file_counts: Map
}
Error
Error type {
code: Str,
message: Str,
param: Str,
type: Str
}
EvalApiError
EvalApiError type {
code: Str?,
message: Str
}
EvalRun
EvalRun type {
object: "eval.run",
id: Str,
eval_id: Str,
status: Str,
model: Str,
name: Str?,
created_at: Int,
report_url: Str?,
result_counts: Map,
per_model_usage: Vec<Map>,
per_testing_criteria_results: Vec<Map>,
data_source: Map,
metadata: Metadata?,
error: EvalApiError?
}
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?
}
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?
}
FineTuningJobStatus
FineTuningJobStatus type "validating_files" | "queued" | "running" | "succeeded" | "failed" | "cancelled"
Metadata
Metadata type Map
ParallelToolCalls
ParallelToolCalls type Bool
Response
Response type Map
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
Upload
Upload type {
id: Str,
created_at: Int,
filename: Str,
bytes: Int,
purpose: Str,
status: UploadStatus,
expires_at: Int,
object: "upload",
file: Any?
}
UploadStatus
UploadStatus type "pending" | "completed" | "cancelled" | "expired"
VectorStoreFileBatchObject
VectorStoreFileBatchObject type {
id: Str,
object: "vector_store.files_batch",
created_at: Int,
vector_store_id: Str,
status: VectorStoreFileBatchStatus,
file_counts: Map
}
VectorStoreFileBatchStatus
VectorStoreFileBatchStatus type "in_progress" | "completed" | "cancelled" | "failed"