← Back to products
🌐

Unified API Gateway

One app_key across services, unified quota/rate/audit

All Yunjii Stack products (UM/IF/MF/Pay/Up/Studio) share the same app_key auth. Gateway handles rate limiting, quota deduction, audit, CORS. One integration, all-access.

example.http
# 同一 access_token 调用不同服务
# 1. 调用 AI 服务(modelflow)
POST https://mf.yunjii.cn/v1/chat/completions
Authorization: Bearer <access_token>
Content-Type: application/json

{ "model": "gpt-4", "messages": [{"role":"user","content":"hi"}] }

# 2. 调用支付服务
POST https://pay.yunjii.cn/api/v1/pay
Authorization: Bearer <access_token>

{ "amount": 9900, "order_id": "order_xxx" }

# 3. 调用存储服务
POST https://up.yunjii.cn/api/v1/upload
Authorization: Bearer <access_token>
Content-Type: multipart/form-data

Core Features

6 core features, each works standalone

One integration, all access

One app_key across um / if / mf / pay / up / studio

Unified rate limit

Token bucket per app_key, 429 + Retry-After on exceed

Quota deduction

Auto-deduct quota per call, UM unified billing

Call audit

Every call logged (app/user/IP/duration/status)

CORS

allow-origin by tier, free=*, enterprise=whitelist

Unified errors

{error, error_code, message} consistent across services

API Endpoints

Via /api/* call the following endpoints

MethodPathDescription
GET/api/v1/quotaQuery current app_key quota
GET/api/v1/usageQuery usage statistics
POST/api/v1/appsCreate/manage apps

Other Products