public interface BatchesApi
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.rxjava3.core.Single<Batch> |
batchesCancel(String batchId)
Cancel a running batch job Stops the batch processing and marks the job as
cancelled (may take up to 10 minutes) Only works for batches in 'validating' or
'in_progress' status
|
io.reactivex.rxjava3.core.Single<Batch> |
batchesCreate(BatchCreateParams batchCreateParams)
Create a new batch processing job Submits a large number of requests for efficient
batch processing with JSONL format Each request must include a unique custom_id for
result mapping Supports /v1/chat/completions and /v1/embeddings endpoints
|
io.reactivex.rxjava3.core.Single<BatchPage> |
batchesList(String after,
Integer limit)
List all batch jobs with pagination Retrieves a paginated list of all batch
processing jobs with filtering options Useful for monitoring multiple batch
operations and their completion status
|
io.reactivex.rxjava3.core.Single<Batch> |
batchesRetrieve(String batchId)
Retrieve details of a specific batch job Gets comprehensive information about batch
processing status and results Status can be: validating, failed, in_progress,
finalizing, completed, expired, cancelling, cancelled
|
@POST(value="batches") io.reactivex.rxjava3.core.Single<Batch> batchesCreate(@Body BatchCreateParams batchCreateParams)
batchCreateParams - Batch configuration including input file, endpoint, and
processing options@GET(value="batches/{batch_id}")
io.reactivex.rxjava3.core.Single<Batch> batchesRetrieve(@Path(value="batch_id")
String batchId)
batchId - Unique identifier of the batch job to retrieve@GET(value="batches") io.reactivex.rxjava3.core.Single<BatchPage> batchesList(@Query(value="after") String after, @Query(value="limit") Integer limit)
after - Cursor for pagination to get batches after this pointlimit - Maximum number of batch jobs to return per page (default: 20)@POST(value="batches/{batch_id}/cancel")
io.reactivex.rxjava3.core.Single<Batch> batchesCancel(@Path(value="batch_id")
String batchId)
batchId - Unique identifier of the batch job to cancelCopyright © 2025. All rights reserved.