LaraCopilot
LaraCopilot
API ReferenceEndpointsAgent

Create project

Generates a new Laravel project from a natural-language prompt and streams progress back as Server-Sent Events. Save the `project_id` returned in the first event — it is required for follow-up prompts and status polling.

POST
/agent/generate
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://builder.laracopilot.com/api/v1/agent/generate" \  -H "Content-Type: application/json" \  -d '{    "prompt": "stringstri"  }'
{}
{
  "message": "string",
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  }
}