class

Anthropic::Batches

Inherits Reference < Object

Batches API resource for message batch operations

Constructors

new(client : Client)
Source

Instance methods

cancel(batch_id : String) : BatchResponse

Cancel a batch

Source
create(requests : Array(BatchRequest)) : BatchResponse

Create a new batch

Source
delete(batch_id : String) : DeletedResponse

Delete a batch

Source
list(limit : Int32 = 20, before_id : String | Nil = nil, after_id : String | Nil = nil) : BatchListResponse

List all batches with pagination

Source
results(batch_id : String, &)

Stream batch results (JSONL format)

Source
retrieve(batch_id : String) : BatchResponse

Retrieve batch status

Source