Skip to content
Numes

API reference · Update key

Keys

Update key

Rename, disable, re-enable or re-budget an inference key with a management key.

PATCHhttps://api.numes.ai/api/v1/keys/{hash}

Send at least one of name, disabled, limit and limit_reset. The billing currency and expiry cannot change; sending billing_currency is an unknown field and returns 400. Set limit to null to remove the spending limit.

Authorization

AuthorizationheaderRequired

Bearer management key. Management keys manage inference keys and cannot run inference. Authorization: Bearer $NUMES_MANAGEMENT_KEY

Headers

X-Request-Idstring

Correlation ID, not an idempotency key. Inference request IDs recorded with a generation are unique per account. A traffic-admitted request reusing a recorded ID returns 400 invalid_request. Traffic admission rejection takes precedence over this conflict, including for reused IDs; it performs no generation lookup and writes no generation, result or attempt. Rate-limit rejection returns 429 rate_limited with Retry-After; an inference limiter outage retains 500 server.

Length1–128

Path parameters

hashstringRequired
Pattern^[a-f0-9]{64}$

Request body

application/json

The contract declares a 32 KiB body limit. The size the service enforces is listed in Limits.

namestring
Length1–100
disabledboolean
limitnumber | null
Range≥ 0
limit_resetenum<string> | null
One ofdailyweeklymonthly

Responses

200Updated API keyapplication/json

BodyKeyResponseapplication/json

dataobjectRequired
Show15 child attributes
hashstringRequired
labelstringRequired
namestringRequired
disabledbooleanRequired
limitnumber | nullRequired
limit_remainingnumber | nullRequired
limit_resetenum<string> | nullRequired
One ofdailyweeklymonthly
usagenumberRequired
usage_dailynumberRequired
usage_weeklynumberRequired
usage_monthlynumberRequired
created_atstring<date-time>Required
updated_atstring<date-time> | nullRequired
expires_atstring<date-time> | nullRequired
billing_currencyenum<string>

Immutable settlement currency; omitted for management keys.

One ofUSDBTC
ErrorCompatible error envelopeapplication/json

Headers

X-Request-Idstring

Correlation identifier assigned or accepted by the service.

Retry-Afterinteger

Optional delay in seconds for retryable rate or availability errors.

Range≥ 1

BodyErrorResponseapplication/json

errorobjectRequired
Show3 child attributes
codeintegerRequired
messagestringRequired
metadataobject
openrouter_metadataobject