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

# API playground

> Try the Chat API directly from your browser.

Use this page as a scratchpad for experimenting with the **Promptify Chat API** during development.

> The playground assumes you are using the hosted app at `https://app.promptify.one` and that you have copied an access token from the **Deploy** page.

## Quick cURL

```bash theme={null}
export PROMPTIFY_ACCESS_TOKEN="paste-your-token-here"

curl -X POST https://app.promptify.one/api/v1/chat \
  -H "Authorization: Bearer $PROMPTIFY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Say hello and tell me what you can do."
  }'
```

## Example request / response

```http theme={null}
POST /api/v1/chat HTTP/1.1
Host: app.promptify.one
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "message": "Draft a friendly onboarding email to a new customer."
}
```

```json theme={null}
{
  "reply": "Hi there — and welcome onboard! …",
  "model": "ft:gpt-4o-mini:promptify:customer-onboarding:2025-01-01",
  "isFineTuned": true,
  "usage": {
    "promptTokens": 142,
    "completionTokens": 97,
    "totalTokens": 239
  },
  "latencyMs": 945
}
```

For more language‑specific snippets and error codes, see the full [Chat API reference](/docs/docs/api-reference/chat).
