# Search project templates

```http
POST /project-templates/search
```

Find the project template that best fits a description of what the user wants to build, ranked by a model; requires a signed-in user on every surface and returns the match with its confidence and reasoning.

## Request body

| Field         | Type   | Required | Description                                                                                                         |
| ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `user_intent` | string | Yes      | Description of what the user wants to build (1 to 500 characters). AI uses this intent to select the best template. |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | Best matching project template with confidence score.                                                       |
| 400    | Invalid input - user\_intent too long or missing                                                            |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden - insufficient permissions                                                                        |
| 429    | The model is overloaded (code limit\_exceeded); retry after retry\_after\_seconds, also sent as Retry-After |
| 500    | Server error - AI processing failed                                                                         |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
