---
title: "Create a native provider batch"
method: POST
path: "/v1/batches"
tags: ["batch"]
---

# Create a native provider batch

`POST /v1/batches`

## Request body

- CoreBatchRequest
  - `completion_window` string
  - `endpoint` string
  - `input_file_id` string
  - `metadata` object
  - `requests` CoreBatchRequestItem[]
    - `body` object
    - `custom_id` string
    - `method` string
    - `url` string

## Response `200`

OK

- CoreBatchResponse
  - `cancelled_at` integer
  - `cancelling_at` integer
  - `completed_at` integer
  - `completion_window` string
  - `created_at` integer
  - `endpoint` string
  - `failed_at` integer
  - `id` string
  - `in_progress_at` integer
  - `input_file_id` string
  - `metadata` object
  - `object` string
  - `provider` string
  - `provider_batch_id` string
  - `request_counts` CoreBatchRequestCounts
    - `completed` integer
    - `failed` integer
    - `total` integer
  - `results` CoreBatchResultItem[]
    - `custom_id` string
    - `error` CoreBatchError
      - `message` string
      - `type` string
    - `index` integer
    - `model` string
    - `provider` string
    - `response` unknown
    - `status_code` integer
    - `url` string
  - `status` string
  - `usage` CoreBatchUsageSummary
    - `input_cost` number
    - `input_tokens` integer
    - `output_cost` number
    - `output_tokens` integer
    - `total_cost` number
    - `total_tokens` integer

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `502` — Bad Gateway

## Changes

- **2026-08-22** `496ff50bdfef` — 3 info
  - added the optional property `error/provider` to the response with the `400` status
  - added the optional property `error/provider` to the response with the `401` status
  - added the optional property `error/provider` to the response with the `502` status
- **2026-04-19** `1a90f5d80e5a` — 18 warning, 3 info
  - removed the optional property `code` from the response with the `400` status
  - removed the optional property `code` from the response with the `401` status
  - removed the optional property `code` from the response with the `502` status
  - removed the optional property `message` from the response with the `400` status
  - …17 more

[Change history](https://skmtc.dev/enterpilot/apis/gomodel-api/changes/v1/batches/post.md)

---

[API](https://skmtc.dev/enterpilot/apis/gomodel-api.md) · [All operations](https://skmtc.dev/enterpilot/apis/gomodel-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/enterpilot/gomodel-api/revisions/496ff50bdfef/schema)
