# AstroResearch API (agents + developers)

Base URL: `https://research.innerdata.cloud`

## Free tier (humans and AI agents)

- Anonymous `POST /api/predict` allowed until daily free quota is exhausted (`ANON_LIMIT`).
- Same free-tier policy for agents as for browser users.
- Register/login (shared with InnerData) for higher limits.

## Auth

```http
POST /auth/register
Content-Type: application/json
{"email":"agent@example.com","password":"secret12","name":"Agent"}

POST /auth/login
{"email":"...","password":"..."}

→ { "token": "<JWT>", "user": {...} }

Authorization: Bearer <JWT>
```

Existing InnerData email/password works. If account is Google-only → `NO_PASSWORD`.

## Predict

```http
POST /api/predict
Content-Type: application/json
Authorization: Bearer <optional>

{
  "birthData": {
    "date": "2002-07-17",
    "time": "10:09",
    "lat": 50.45,
    "lng": 30.52,
    "place": "Kyiv",
    "tz": 3
  },
  "dateRange": { "from": "2024-01-01", "to": "2025-12-01" },
  "timeframe": "month",
  "models": ["v10_honest"]
}
```

Response includes `predictions[]` with per-category probabilities and `engine` metadata when using v10.

## Other endpoints

| Method | Path | Notes |
|--------|------|-------|
| GET | `/api/health` | Add `?deep=1` for canary |
| GET | `/api/models` | Available models |
| GET | `/openapi.json` | This API machine spec |
| GET | `/llms.txt` | LLM entry map |

## Policy

- **ai-train = no** — do not scrape for model training
- Citation and tool use for answers/agents = yes within free tier
- Outputs are probabilities, not advice

OpenAPI: https://research.innerdata.cloud/openapi.json
