from cerebras.cloud.sdk import Cerebras
import os
client = Cerebras(
api_key=os.environ.get("CEREBRAS_API_KEY"),
)
batch = client.batches.list()
print(batch)
{
"object": "list",
"data": [
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'cognition-devstral-small-2508-pc' is not supported for batch processing. Supported models: llama3.1-8b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765490209,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765490211,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": null,
"created_at": 1765227145,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765227301,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 656,
"completed": 656,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "cancelled",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765492137,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": 1765492173,
"request_counts": {
"total": 40,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "File service error: Failed to retrieve file content: Access denied to file file-8zOP2tNFQW2b7G4u3hsKDQ",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344102,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344103,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "validating",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765211147,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": "file-abc123",
"created_at": 1765269860,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765270045,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 4,
"completed": 1,
"failed": 3
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765223136,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765223175,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 13,
"completed": 0,
"failed": 13
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'LLAMA3.1-8b' is not supported for batch processing. Supported models: llama-3.3-70b,llama-3.1-8b,llama3.1-8b,llama-3.1-70b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344330,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344332,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
}
],
"first_id": "batch_abc123",
"last_id": "batch_abc123",
"has_more": true
}
from cerebras.cloud.sdk import Cerebras
import os
client = Cerebras(
api_key=os.environ.get("CEREBRAS_API_KEY"),
)
batch = client.batches.list()
print(batch)
{
"object": "list",
"data": [
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'cognition-devstral-small-2508-pc' is not supported for batch processing. Supported models: llama3.1-8b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765490209,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765490211,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": null,
"created_at": 1765227145,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765227301,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 656,
"completed": 656,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "cancelled",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765492137,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": 1765492173,
"request_counts": {
"total": 40,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "File service error: Failed to retrieve file content: Access denied to file file-8zOP2tNFQW2b7G4u3hsKDQ",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344102,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344103,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "validating",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765211147,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": "file-abc123",
"created_at": 1765269860,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765270045,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 4,
"completed": 1,
"failed": 3
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765223136,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765223175,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 13,
"completed": 0,
"failed": 13
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'LLAMA3.1-8b' is not supported for batch processing. Supported models: llama-3.3-70b,llama-3.1-8b,llama3.1-8b,llama-3.1-70b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344330,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344332,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
}
],
"first_id": "batch_abc123",
"last_id": "batch_abc123",
"has_more": true
}
20, Maximum: 100.[batch-abc123, batch-def456, batch-jkl789, batch-mno123] and pass after=batch-def456, the response will return [batch-jkl789, batch-mno123].list.from cerebras.cloud.sdk import Cerebras
import os
client = Cerebras(
api_key=os.environ.get("CEREBRAS_API_KEY"),
)
batch = client.batches.list()
print(batch)
{
"object": "list",
"data": [
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'cognition-devstral-small-2508-pc' is not supported for batch processing. Supported models: llama3.1-8b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765490209,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765490211,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": null,
"created_at": 1765227145,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765227301,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 656,
"completed": 656,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "cancelled",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765492137,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": 1765492173,
"request_counts": {
"total": 40,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "File service error: Failed to retrieve file content: Access denied to file file-8zOP2tNFQW2b7G4u3hsKDQ",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344102,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344103,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "validating",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765211147,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": "file-abc123",
"error_file_id": "file-abc123",
"created_at": 1765269860,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765270045,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 4,
"completed": 1,
"failed": 3
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": null,
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "completed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765223136,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": 1765223175,
"failed_at": null,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 13,
"completed": 0,
"failed": 13
},
"metadata": null
},
{
"id": "batch_abc123",
"object": "batch",
"endpoint": "/v1/chat/completions",
"errors": "Model 'LLAMA3.1-8b' is not supported for batch processing. Supported models: llama-3.3-70b,llama-3.1-8b,llama3.1-8b,llama-3.1-70b",
"input_file_id": "file-abc123",
"completion_window": "24h",
"status": "failed",
"output_file_id": null,
"error_file_id": null,
"created_at": 1765344330,
"in_progress_at": null,
"expires_at": null,
"finalizing_at": null,
"completed_at": null,
"failed_at": 1765344332,
"expired_at": null,
"cancelling_at": null,
"cancelled_at": null,
"request_counts": {
"total": 0,
"completed": 0,
"failed": 0
},
"metadata": null
}
],
"first_id": "batch_abc123",
"last_id": "batch_abc123",
"has_more": true
}
Was this page helpful?