Partner API endpoints

Manage API keys, key groups, limits, usage and statistics through the Partner API.

Partner API endpoints

Base URL: https://panel.model-gate.com/api/v1/partner

Authenticate every request with Authorization: Bearer mg_partner_....

API keys

  • POST /keys
  • GET /keys
  • GET /keys/{id}
  • PATCH /keys/{id}
  • DELETE /keys/{id}
  • POST /keys/{id}/freeze
  • POST /keys/{id}/unfreeze
  • POST /keys/{id}/rotate
  • POST /keys/{id}/reset-usage
  • GET /keys/{id}/usage
  • GET /keys/{id}/spent-limit

Key create and update fields: name, group_id, rpm_limit, concurrency_limit, spend_limit. A numeric limit of 0 means unlimited. group_id is the public group ID or an empty value for no group.

Key groups

  • GET /groups
  • POST /groups
  • GET /groups/{id}
  • PATCH /groups/{id}
  • DELETE /groups/{id}
  • POST /groups/{id}/reset-usage
  • GET /groups/{id}/usage
  • GET /groups/{id}/stats
  • GET /groups/{id}/members
  • POST /groups/{id}/members
  • DELETE /groups/{id}/members/{keyId}

Group create and update fields: name, description, status, rpm_limit, concurrency_limit, spend_limit. Status is active or frozen.

Key and group RPM, concurrency and spend limits are enforced independently. A request is rejected when either level exceeds its limit. Moving a key between groups does not rewrite historical statistics: every request keeps the group snapshot captured at request time.

Reset usage clears the resettable usage window and updates usage_reset_at; it never changes total_spent.

Transactions and async results

  • GET /transactions
  • GET /requests/{request_id}

Group statistics use aggregate tables for completed periods and raw api_requests only for the current incomplete hour.

Identifier convention: every {id} in this documentation is the resource public_id. Internal numeric database IDs are never accepted or returned. In nested member routes, {keyId} is the API key public_id.