---
title: "Provision an API key"
method: POST
path: "/v1/keys/provision"
tags: ["billing"]
---

# Provision an API key

`POST /v1/keys/provision`

## Request

- Base URL: `https://modelglass-api.vercel.app`
- URL: `https://modelglass-api.vercel.app/v1/keys/provision`
- Auth: none required

Public bootstrap: `{ "plan": "free" }` issues an mg_free_… key with no payment; `{ "plan": "app" }` issues an mg_app_… key with no payment (auto-provisioned by the ModelglassPro iOS app — wider price-history window and /v1/news access, but not a paid tier). Any other plan falls through to an internal-only flow (requires an `internal` Bearer key).

## Request body

- object
  - `plan` 'free' | 'app' | 'starter' | 'pro', required
  - `label` string: Required for internal (non-free/app) provisioning.

## Response `200`

Free or app-plan key issued (bare shape, not the data envelope).

- object
  - `key` string
  - `plan` 'free' | 'app'
  - `rate_limit` integer

## Other responses

- `201`: Key issued via the internal flow.
- `400`: Invalid plan/label (BAD_REQUEST).
- `401`: Non-free/app plan without a valid key (UNAUTHORIZED).
- `403`: Valid key but not `internal` (FORBIDDEN).
- `429`: Free/app bootstrap limited to 20/day per origin (shared budget), or (internal flow) over the caller's plan rate limit (RATE_LIMITED).

---

[API](https://skmtc.dev/modelglass/apis/modelglass-read-api.md) · [All operations](https://skmtc.dev/modelglass/apis/modelglass-read-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelglass/apis/modelglass-read-api/revisions/5948ffa60462?raw)
