> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nearnode.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Batch

> Generate multiple nodes at once for fleet operations.

### Body

<ParamField body="label" type="string" required>
  Human-readable batch name (e.g., "Q1 2026 Business Cards").
</ParamField>

<ParamField body="prefix" type="string" required>
  Serial ID prefix (e.g., "VID-2026"). Nodes will be numbered `VID-2026-001`, `VID-2026-002`, etc.
</ParamField>

<ParamField body="quantity" type="integer" required>
  Number of nodes to generate (max 500).
</ParamField>

<ParamField body="function_type" type="string" required>
  The function type for all nodes. One of `redirect`, `vcard`, `wifi`, `microsite`.
</ParamField>

<ParamField body="base_payload" type="object">
  Default payload applied to all generated nodes.
</ParamField>

<ParamField body="template_id" type="string">
  Optional template ID to bind all nodes to a template.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://nearnode.io/api/v1/batches \
    -H "Authorization: Bearer sk_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "label": "Q1 2026 Business Cards",
      "prefix": "VID-2026",
      "quantity": 100,
      "function_type": "vcard",
      "base_payload": {
        "organization": "VidiaI",
        "website": "https://vidiai.ch"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "data": {
      "id": "batch_xyz789...",
      "label": "Q1 2026 Business Cards",
      "prefix": "VID-2026",
      "quantity": 100,
      "status": "generating",
      "manifest_url": null
    }
  }
  ```
</ResponseExample>

<Note>
  Batch generation is asynchronous. Poll the batch status or set up a [webhook](/concepts/webhooks) to receive a `batch.completed` event when all nodes are ready.
</Note>
