Programmatic access to account management, API key lifecycle, and usage queries.
Forii is on the Free Plan today. The credit purchase, Razorpay checkout, auto-recharge, and invoice endpoints below are on the roadmap and not yet live. Only account, API key, balance, and usage endpoints are available today.
Account
Get account
GET /v1/accounts/{account_id}
Returns name, email, plan, and credit balance.
Create API key
POST /v1/accounts/{account_id}/apiKeys
Authorization: Bearer {session_token}
Content-Type: application/json
{"name": "prod-api"}
{
"id": "key_abc123",
"name": "prod-api",
"key": "forii_sk_xxxxxxxxxxxxxxxxxxxxxxxx",
"created": "2025-01-15T10:30:00Z",
"status": "active"
}
The full API key is returned only once at creation. Store it securely.
List API keys
GET /v1/accounts/{account_id}/apiKeys
Authorization: Bearer {session_token}
Returns masked keys with metadata.
Delete API key
DELETE /v1/accounts/{account_id}/apiKeys/{key_id}
Authorization: Bearer {session_token}
Immediate revocation. Any in-flight requests with this key will fail.
Balance
Get balance
GET /v1/accounts/{account_id}/balance
Authorization: Bearer {session_token}
{
"credits_inr": 50.00,
"plan": "free"
}
Free Plan accounts start with ₹50 in credits. Paid tiers and credit purchases are coming soon.
Usage
GET /v1/accounts/{account_id}/usage?start=2025-01-01&end=2025-01-31&group_by=model
Authorization: Bearer {session_token}
{
"data": [
{
"date": "2025-01-15",
"model": "forii/deepseek-v3",
"prompt_tokens": 1250000,
"completion_tokens": 340000,
"total_tokens": 1590000,
"cost_inr": 531.50
}
]
}
All costs in INR. This is an India differentiator — no USD conversion needed.
Roadmap — Credits & Billing (not yet live)
The following endpoints ship when paid tiers launch. They are documented here for forward compatibility only.
| Endpoint | Purpose | Status |
|---|
POST /v1/accounts/{id}/credits | Initiate credit purchase via Razorpay | Coming soon |
POST /v1/accounts/{id}/credits/verify | Verify Razorpay payment, add credits | Coming soon |
GET/PUT /v1/accounts/{id}/auto_recharge | Auto-recharge configuration | Coming soon |
GET /v1/accounts/{id}/transactions | Transaction history | Coming soon |
GET /v1/accounts/{id}/invoices/{invoice_id} | GST-compliant PDF invoice | Coming soon |
When paid tiers ship, Forii will use Razorpay for payment processing with UPI, cards, netbanking, and wallets.
- Pricing — Model pricing and the Free Plan
- Dashboard — API keys, usage, and recent requests in the UI