API Reference
📝 TODO — this English page is a skeleton. The structure mirrors the Chinese page, which is fully written.
ModelFold's HTTP API is split in two:
| Group | Prefix | Auth | Purpose |
|---|---|---|---|
| Model gateway | /v1 | API key | Image, video and chat models |
| Console API | /api | Session token (JWT) | Auth, account, keys, wallet, mail |
text
https://ai.modelfold.online # current deployment
https://ai.modelfold.online # production domain (once live)Model gateway /v1
| Method | Path | Description |
|---|---|---|
GET | /v1/models | List available models |
POST | /v1/images/generations | Image generation and editing |
POST | /v1/videos/generations | Video generation |
POST | /v1/chat/completions | Chat completions (OpenAI-compatible) |
See the Gateway reference.
Console API /api
| Group | Endpoints | Reference |
|---|---|---|
| Authentication | /api/auth/* | Auth |
| Account | /api/account/* | Account |
| API keys | /api/keys | API keys |
| Wallet | /api/wallet/* | Wallet |
| Mail and email | /api/mail/*, /api/email/* | |
| Health | GET /api/health | — |
Response envelope
Success:
json
{ "ok": true, "...": "endpoint specific" }Failure:
json
{ "ok": false, "error": { "type": "insufficient_credits", "message": "..." } }Rate limits
| Scope | Limit |
|---|---|
/v1 gateway | 60 requests per key per minute |
| Key creation | 30 per account per minute |
| Register / login | 30 per IP per 10 minutes |
| Password change | 30 per account per 10 minutes |
| Top-up | 10 per account per minute |
| Email flows | 10 per IP per 10 minutes |
| Test mail | 5 per account per 10 minutes |
Health check
bash
curl https://ai.modelfold.online/api/healthjson
{ "ok": true, "db": "up" }