Skip to main content
POST
Mint a model lease for MCPJam-hosted inference

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

Project id, or the literal default for the key org's Default project.

Body

application/json
model
string
required

Canonical model id. Only anthropic/claude-* and openai/gpt-5* are served, and only if the model has a gateway pricing row.

Example:

"anthropic/claude-sonnet-4.5"

runId
string

Caller-chosen id to revoke by. Generated if omitted.

maxOutputTokens
integer

Per-call output ceiling, clamped to the server maximum.

Response

A short-lived lease and the proxy to present it to.

lease
string
required

Present it as the x-mcpjam-harness-lease header on requests to proxyBaseUrl. Never as a bearer token, and never sent to any other host.

protocol
enum<string>
required

Which vendor wire format proxyBaseUrl speaks, derived from the model's vendor prefix.

Available options:
anthropic,
openai
proxyBaseUrl
string<uri>
required

Base URL for the metered model proxy. Anthropic leases accept POST /v1/messages; OpenAI leases accept POST /v1/responses.

expiresAt
integer
required

Epoch milliseconds. Mint a new lease before this; the proxy fails an expired one closed.

runId
string
required

Pass to the revoke operation to kill this lease early.

model
string
required