Skip to content

Authentication ​

📝 TODO — this English page is a skeleton. The structure mirrors the Chinese page, which is fully written.

ModelFold has two independent credential systems:

CallerUsed onCredentialHeader
Your backend/v1 gatewayAPI key (mf- prefix)Authorization: Bearer mf-...
Console frontend/api/*Session token (JWT)Authorization: Bearer <token>

Calling models only requires an API key.

Using an API key ​

bash
curl -X POST "https://ai.modelfold.online/v1/chat/completions" \
  -H "Authorization: Bearer mf-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"hello"}]}'

Key lifecycle ​

ActionEndpoint
ListGET /api/keys
CreatePOST /api/keys
RevokeDELETE /api/keys/:id

Failure modes ​

HTTPerror.typeCause
401unauthorizedMissing, malformed or revoked key
402insufficient_creditsBalance too low; the upstream is never called
429rate_limitedOver 60 requests per key per minute

See also ​

ModelFold — one API for all the best AI models.