> 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.md).

# Tenant.public.supply Plans.generate

```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":{"GenerateSupplyPlanRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["partner","internal"]},"item_location_id":{"type":"integer","description":"Item identification: ID or name+location pair"},"item_name":{"type":"string","maxLength":255},"location_name":{"type":"string","maxLength":255},"view_id":{"type":"integer","description":"View identification: ID or name"},"view_name":{"type":"string","maxLength":255}},"required":["mode"],"title":"GenerateSupplyPlanRequest"}},"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":{"post":{"operationId":"tenant.public.supply_plans.generate","tags":["Compute"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSupplyPlanRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"message":{"type":"string","const":"Supply plan generated successfully."},"data":{"type":"array","prefixItems":[{"type":"array","items":{}}],"minItems":1,"maxItems":1,"additionalItems":false},"meta":{"anyOf":[{"type":"array","items":{}},{"type":"string"}]},"links":{"type":"string"}},"required":["message","data","meta","links"]},{"type":"string"},{"type":"object","properties":{"message":{"type":"string","const":"Dry run completed. Input validated successfully."},"data":{"type":"array","prefixItems":[{"type":"object","properties":{"dry_run":{"type":"boolean"},"mode":{},"estimated_credit_cost":{"type":"integer"},"validation_passed":{"type":"boolean"}},"required":["dry_run","mode","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"]}]}}}},"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 generating the supply plan."},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}}}}}}}}}
```
