Skip to main content

API Keys

Manage API keys — sign up for a new account, verify your email, rotate keys with grace periods, list active keys, and revoke compromised ones.

Base URL: https://novyx-ram-api.fly.dev

Tier: All (signup is public)


Sign Up

POST /v1/keys

Create a new Novyx account. Sends a verification email — your API key activates after verification.

Public endpoint

No authentication required. Rate limited to 2 signups per IP per 30 days.

Request body

ParameterTypeRequiredDescription
emailstringYesValid email address (disposable domains rejected)

Response fields

FieldTypeDescription
api_keynullAlways null until email is verified
tierstringfree
created_atstringISO 8601 timestamp
messagestringInstructions to check email
requires_verificationbooleanAlways true

Examples

import requests

r = requests.post(
"https://novyx-ram-api.fly.dev/v1/keys",
json={"email": "alice@example.com"},
)
print(r.json()["message"]) # Check your email to verify

Errors

StatusCodeCause
400VALIDATION_ERRORDisposable email domain
429RATE_LIMITEDToo many signups from this IP or email

Verify Email

POST /v1/verify

Verify your email and activate your API key using the token from the verification email.

Request body

ParameterTypeRequiredDescription
tokenstringYesVerification token from email
emailstringYesEmail address

Response fields

FieldTypeDescription
api_keystringYour activated API key
tierstringAccount tier
messagestringConfirmation message

Examples

r = requests.post(
"https://novyx-ram-api.fly.dev/v1/verify",
json={"token": "abc123", "email": "alice@example.com"},
)
print(r.json()["api_key"]) # nram_...

Errors

StatusCodeCause
400INVALID_TOKENToken expired or invalid
404NOT_FOUNDNo pending key for this email

Rotate Key

POST /v1/keys/rotate

Generate a new API key and deprecate the old one. The old key remains valid during a grace period.

Response fields

FieldTypeDescription
new_keystringYour new API key
grace_expires_atstring | nullWhen the old key stops working (ISO 8601)
messagestringConfirmation message

Examples

from novyx import Novyx

nx = Novyx(api_key="nram_your_key")

result = nx.rotate_key()
print(f"New key: {result['new_key']}")
print(f"Old key valid until: {result['grace_expires_at']}")

Response

{
"new_key": "nram_new_abc123_...",
"grace_expires_at": "2026-03-16T12:00:00Z",
"message": "Key rotated. Old key valid during grace period."
}

List Keys

GET /v1/keys

List all API keys for your account with their status.

Response fields

FieldTypeDescription
keysarrayArray of key info objects

Each key includes:

FieldTypeDescription
key_idstringKey identifier
key_prefixstringFirst characters of the key
tierstringPlan tier
created_atstringCreation timestamp
expires_atstring | nullExpiry timestamp
grace_expires_atstring | nullGrace period end
revoked_atstring | nullRevocation timestamp
statusstringactive, expired, revoked, or grace

Examples

result = nx.list_keys()
for key in result["keys"]:
print(f"{key['key_prefix']}... ({key['status']})")

Response

{
"keys": [
{
"key_id": "key_a1b2c3d4",
"key_prefix": "nram_abc12",
"tier": "starter",
"created_at": "2026-03-01T10:00:00Z",
"expires_at": null,
"grace_expires_at": null,
"revoked_at": null,
"status": "active"
}
]
}

Revoke Key

POST /v1/keys/revoke

Immediately revoke an API key. Use this if a key is compromised.

Request body

ParameterTypeRequiredDescription
key_idstringYesKey ID or prefix to revoke

Response fields

FieldTypeDescription
revoked_key_idstringID of revoked key
messagestringConfirmation message

Examples

result = nx.revoke_key("key_a1b2c3d4")
print(result["message"])

Response

{
"revoked_key_id": "key_a1b2c3d4",
"message": "Key revoked successfully"
}

Errors

StatusCodeCause
404NOT_FOUNDKey does not exist