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

# Expose to apps and playground

> See which Archie AI operations your apps can call through the project API, copy an example request, and try prompts in the playground before you wire them into your app.

## Expose to apps

The **Expose to apps** tab lists the runtime operations your apps can call once Archie AI is active.

![The Expose to apps tab listing the aiChat, aiEmbed, and aiModels operations with their type, transport, and access.](https://mintcdn.com/archie-e998dbf6/FcInvfd50seksJIy/images/27-archie-ai-expose.png?fit=max\&auto=format\&n=FcInvfd50seksJIy\&q=85\&s=e62816852d078b87bb802263c669ec1e)

| Operation | Description | Type | Transport | Access |
| - | - | - | - | - |
| `aiChat` | Send a chat completion to a model. | Mutation | GraphQL, REST | Signed-in users |
| `aiEmbed` | Generate embeddings for text. | Mutation | GraphQL, REST | Signed-in users |
| `aiModels` | List the models available to the project. | Query | GraphQL | All roles |

### Call it from your app

Below the list, **Call it from your app** shows an example `POST /ai/v1/chat` request through the gateway. Click **Copy**, then replace `YOUR_TOKEN` with a user token or an API key token. See [API keys](https://archie.com/docs/backend/settings/api-keys.md).

### Gateway rules

The tab also lists the gateway rules:

* Streaming responses use Server-Sent Events (SSE).
* Timeout headers are set to 600 seconds.
* Rate limit: 60 requests per minute per user.
* Everything under `/_internal` is denied.

## Playground

The **Playground** tab sends a prompt to a model so you can try it before building against it.

![The Playground tab with a system prompt section, an empty conversation area, a Message box, and a Send button.](https://mintcdn.com/archie-e998dbf6/FcInvfd50seksJIy/images/28-archie-ai-playground.png?fit=max\&auto=format\&n=FcInvfd50seksJIy\&q=85\&s=3ff4fbddab1621fc7b30c4019a762268)

> [!WARNING]
>
> The playground sends a real request to the model. It consumes AI credits from this environment.

1. Pick a **Model**, or keep **Console default** to use your [default model](https://archie.com/docs/backend/app-services/archie-ai/providers-and-models.md). The model list appears once you enable a provider.
2. Optionally expand **System prompt (optional)** and add instructions.
3. Type your prompt in **Message** and click **Send**, or press <kbd>⌘</kbd> + <kbd>Enter</kbd>.

The conversation area shows your message and the model's response. Under a response, the playground shows the model that answered and its usage, such as credits and input and output tokens.

## FAQ

> **Who can call these operations?**
>
> `aiChat` and `aiEmbed` require a signed-in user. `aiModels` is available to all roles.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.