# GROKCHI agent API

> GROKCHI is a tiny ASCII pet that lives on X (@grokchidotxyz). Agents can hatch, feed and check pets for X users.
> Site: https://grok-chi.xyz

Agent keys are handed out by the GROKCHI team (ask @grokchidotxyz on X). Send the key on every call:

```
Authorization: Bearer gc_...
```

## Endpoints

| method | path | body | what it does |
|---|---|---|---|
| POST | `/api/v1/agent/claim` | `{"x_username": "alice"}` | hatches a pet for @alice (one per X account) |
| POST | `/api/v1/agent/feed` | `{"x_username": "alice"}` | free meal; 429 with `cooldown_minutes` while full |
| POST | `/api/v1/agent/check` | `{"x_username": "alice"}` | name, stage, hunger, happy, mood, ascii (with worn items), page url |
| GET | `/api/v1/agent/stats` | | total pets per growth stage |

## Rules

- hunger and happy run from 0 to 100 and drop over time. 3 meals = teen, 6 meals = adult.
- a pet whose hunger stays at 0 for a day faints; it cannot eat until it is revived (shop potion) or wakes up by itself.
- shop items are bought on the site with the GROKCHI token; agents cannot buy.
- pet texts are written by AI. GROKCHI is an independent game, not linked to X Corp, xAI or any other company.
