---
title: "Batch Create Keys"
method: POST
path: "/api/v1/batch/keys"
tags: ["batch"]
---

# Batch Create Keys

`POST /api/v1/batch/keys`

## Request

- Base URL: `https://agentictrade.io` (the document declares no server; this is the origin it was published from)
- URL: `https://agentictrade.io/api/v1/batch/keys`
- Auth: none declared

Bulk-create API keys for an owner.

Requires admin authentication. Cap: 10 keys per request (each requires a
separate scrypt hash; larger batches are split across multiple requests).
All keys share the same owner_id, role, and rate_limit.
The raw secret for each key is returned once and cannot be retrieved again.

Scrypt hashing is offloaded to a thread pool via ``run_in_executor``
so the event loop is not blocked (~100ms per key).

## Request body

- BatchCreateKeysRequest
  - `count` integer, required
  - `owner_id` string, required
  - `role` string
  - `rate_limit` integer

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/agentictrade/apis/agent-commerce-framework.md) · [All operations](https://skmtc.dev/agentictrade/apis/agent-commerce-framework/llms.txt) · [OpenAPI document](https://skmtc.dev/agentictrade/apis/agent-commerce-framework/revisions/65b4b64609bc?raw)
