> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Product Suggestions

# AI Product Suggestions

Returns AI-generated suggestions for which store products (time passes, credits, etc.) best match a natural language prompt. The response includes both an explanation and a list of preferred product IDs.

## Authentication

Requires an authenticated customer session.

## Query Parameters

<ParamField query="prompt" type="string" required>
  The user's natural language question or preference description. Example: "What's the most affordable product with weekend access?"
</ParamField>

## Response

<ResponseField name="Response" type="object">
  AI result wrapper.
</ResponseField>

<ResponseField name="Response.Answer" type="string">
  Human-readable explanation answering the prompt.
</ResponseField>

<ResponseField name="Response.PreferredProductIds" type="array[number]">
  Product IDs recommended by the assistant.
</ResponseField>

## Example Response

```json theme={null}
{
  "Response": {
    "Answer": "The 10-day pass is the most cost-effective for occasional weekend use.",
    "PreferredProductIds": [201, 208, 245]
  }
}
```

## Usage in Portal

* Public Checkout – Products grid
  * `src/views/public/checkout/products/ProductsGrid.tsx` (filters product list by AI)
  * `src/views/checkout/steps/components/ProductAiPrompt.tsx`

## Related Endpoints

* `GET /api/public/ai/tariffs` – Plan suggestions by prompt
* `GET /api/public/ai/bookings` – Booking intent parsing and suggestions
* `GET /api/public/ai/chats/{sessionId}` – General-purpose assistant chat

## Error Responses

<ResponseField name="401 Unauthorized" type="error">
  The user is not authenticated.
</ResponseField>

<ResponseField name="400 Bad Request" type="error">
  Missing or invalid prompt.
</ResponseField>
