> For the complete documentation index, see [llms.txt](https://docs.claret.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claret.app/api-reference/compute/tenant-public-supply-plans-generate-batch.md).

# Tenant.public.supply Plans.generate Batch

```json
{"openapi":"3.1.0","info":{"title":"Claret","version":"1.0.0"},"tags":[{"name":"Compute","description":"Generate supply plans and forecasts. Runs asynchronously where noted."}],"servers":[{"url":"https://plan.claret.app/{tenant}/api/v1","description":"Production","variables":{"tenant":{"default":"your-tenant","description":"Your Claret tenant identifier (the slug in your Claret URL)."}}}],"security":[{"http":[]}],"components":{"securitySchemes":{"http":{"type":"http","scheme":"bearer"}},"schemas":{"GenerateBatchSupplyPlanRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["partner","internal"]},"view_id":{"type":"integer","description":"View: ID or name (at least one required)"},"view_name":{"type":"string","maxLength":255},"location_id":{"type":"integer","description":"Location: ID or name (at least one required)"},"location_name":{"type":"string","maxLength":255}},"required":["mode"],"title":"GenerateBatchSupplyPlanRequest"}},"responses":{"AuthenticationException":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}},"paths":{"/supply-plans/generate-batch":{"post":{"operationId":"tenant.public.supply_plans.generate_batch","tags":["Compute"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateBatchSupplyPlanRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"type":"object","properties":{"message":{"type":"string","const":"Dry run completed. Batch request validated successfully."},"data":{"type":"array","prefixItems":[{"type":"object","properties":{"dry_run":{"type":"boolean"},"mode":{},"item_count":{"type":"integer"},"estimated_credit_cost":{"type":"integer"},"validation_passed":{"type":"boolean"}},"required":["dry_run","mode","item_count","estimated_credit_cost","validation_passed"]}],"minItems":1,"maxItems":1,"additionalItems":false},"meta":{"anyOf":[{"type":"array","items":{}},{"type":"string"}]},"links":{"type":"string"}},"required":["message","data","meta","links"]}]}}}},"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","prefixItems":[{"type":"object","properties":{"job_id":{"type":["string","null"]},"mode":{},"item_count":{"anyOf":[{"type":"string"},{"type":"integer","enum":[0]}]},"status":{"type":"string","const":"queued"}},"required":["job_id","mode","item_count","status"]}],"minItems":1,"maxItems":1,"additionalItems":false},"meta":{"anyOf":[{"type":"array","items":{}},{"type":"string"}]},"links":{"anyOf":[{"type":"object","properties":{"job_status":{"type":"string"}},"required":["job_status"]},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},{"type":"string"}]}},"required":["message","data","meta","links"]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","const":"https://httpstatuses.com/500"},"title":{"type":"string","const":"Internal Server Error"},"status":{"type":"integer","const":500},"detail":{"type":"string","const":"An error occurred while starting the batch supply plan generation."},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}}}},"503":{"description":"","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","const":"https://httpstatuses.com/503"},"title":{"type":"string","const":"Service Unavailable"},"status":{"type":"integer","const":503},"detail":{"type":"string","const":"The compute queue is currently overloaded. Please try again later."},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}}}}}}}}}
```
