Naturali API Keys API
Create, scope, rotate and revoke nat_sk_ API keys.
Create, scope, rotate and revoke nat_sk_ API keys.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/naturali-ai:naturali-ai-api-keys-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: naturali.ai API Keys API
version: 1.0.0
description: The naturali.ai API. This document is the merge of every per-resource spec under openapi/v1/ — the single wire contract for all v1 endpoints.
contact:
name: naturali.ai
url: https://naturali.ai
servers:
- url: https://api.naturali.ai
description: Host of your naturali.ai deployment; every path carries the /v1 prefix.
security:
- bearerAuth: []
- oauth2:
- mcp:access
tags:
- name: API Keys
description: Create, scope, rotate and revoke nat_sk_ API keys.
paths:
/v1/api-keys:
get:
tags:
- API Keys
summary: List API keys
description: Lists API keys accessible to the caller. A project-scoped credential sees only keys in its project; an account-scoped credential sees all keys in the account. Raw secrets are never returned.
operationId: listApiKeys
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Cursor'
responses:
'200':
description: A page of API keys.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Page'
- properties:
data:
type: array
items:
$ref: '#/components/schemas/ApiKeyRecord'
'401':
$ref: '#/components/responses/Unauthorized'
post:
tags:
- API Keys
summary: Create an API key
description: 'Creates an API key. When `project_id` is set the key is scoped to that project (the default and recommended stance); omit it for an account-scoped key. `capabilities` narrows the key to the operations whose capability it names; empty, the key reaches whatever its holder''s membership reaches. Omitted, it is empty, or the caller''s own set when the caller is a narrowed key. An unknown capability is `400`. The raw `key` (nat_sk_…) is returned only in this response.
A narrowed key may grant only a non-empty subset of its own set: a wider or empty set is `403`, on update too, and so is rotating a key wider than it.
A project-scoped key requires membership of that project. The key carries no role of its own — every request it makes resolves its holder''s membership again — so it can never reach past what its minter already had. An account-scoped key requires a credential that is not itself confined to one project.
A connected app cannot create keys at all: a grant is revocable and a key is not, so a key minted under a grant would still work after the app was disconnected. Reading and revoking keys stay available.'
operationId: createApiKey
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyCreate'
responses:
'201':
description: API key created. The raw key value is only returned here.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyCreated'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ApiKeyForbidden'
/v1/api-keys/{api_key_id}:
parameters:
- $ref: '#/components/parameters/ApiKeyId'
get:
tags:
- API Keys
summary: Get an API key
description: Returns metadata for an API key. The raw secret is never returned after creation.
operationId: getApiKey
responses:
'200':
description: API key metadata.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyRecord'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ApiKeyForbidden'
'404':
$ref: '#/components/responses/NotFound'
patch:
tags:
- API Keys
summary: Update an API key
description: Rename an API key or replace its capability set; the change holds from the key's next call. The scope (project vs account) is immutable. A narrowed caller may set only a non-empty subset of its own set (`403`).
operationId: updateApiKey
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyUpdate'
responses:
'200':
description: API key updated.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyRecord'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ApiKeyForbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
tags:
- API Keys
summary: Revoke an API key
description: Revokes an API key immediately. Subsequent use returns 401, and work the key started (a paused generation) calls no tool on its next step.
operationId: deleteApiKey
responses:
'204':
description: API key revoked.
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ApiKeyForbidden'
'404':
$ref: '#/components/responses/NotFound'
'502':
$ref: '#/components/responses/ApiKeyRevocationUnavailable'
/v1/api-keys/{api_key_id}:rotate:
parameters:
- $ref: '#/components/parameters/ApiKeyId'
post:
tags:
- API Keys
summary: Rotate an API key
description: 'Issues a new secret for the same key record (same id, scope and capabilities) and invalidates the previous secret. The new raw `key` is returned only in this response.
Refused for a connected app, like creation: rotation returns a raw secret for a key the caller need never have held, so it reaches the same place by another door.'
operationId: rotateApiKey
security:
- bearerAuth: []
responses:
'200':
description: Rotated. The new raw key value is only returned here.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiKeyCreated'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/ApiKeyForbidden'
'404':
$ref: '#/components/responses/NotFound'
components:
responses:
BadRequest:
description: The request was malformed or failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
Unauthorized:
description: Missing or invalid credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ApiKeyRevocationUnavailable:
description: '`upstream_unavailable`: the runtime did not record the revocation, so the key stays live. Retry.
'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
ApiKeyForbidden:
description: Authenticated, but not permitted to act on this key, or outside a narrowed key's capabilities.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: The resource does not exist (existence is not leaked).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
Limit:
name: limit
in: query
required: false
description: Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.
schema:
type: integer
minimum: 1
maximum: 100
default: 50
ApiKeyId:
name: api_key_id
in: path
required: true
description: API key public ID (key_ prefix).
schema:
type: string
example: key_V1StGXR8Z5jdHi6B
Cursor:
name: cursor
in: query
required: false
description: The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.
schema:
type: string
schemas:
Page:
type: object
description: One page of a list. Rows inserted or removed between two calls neither repeat nor skip a row on the next page.
required:
- data
- next_cursor
properties:
data:
type: array
description: This page's items, in the list's order.
items: {}
next_cursor:
type:
- string
- 'null'
description: Pass as `cursor` to fetch the next page; `null` on the last page.
ErrorResponse:
type: object
required:
- error
properties:
error:
type: object
description: Structured error. Every error response uses this shape, so `code` can be read without first checking the type of `error`.
required:
- code
- message
properties:
code:
type: string
description: 'Machine-readable error code: lower_snake for an error naturali raises (`access_denied`), UPPER_SNAKE for one the runtime reports (`RESOURCE_NOT_FOUND`).'
example: access_denied
message:
type: string
description: Human-readable explanation.
example: Your role in this project does not carry this action.
details:
type: object
additionalProperties: true
description: Structured context for an error naturali raises, such as the `resource` and `limit` of a `plan_limit_reached`.
meta:
type: object
description: Structured context for an error the runtime reports.
ApiKeyCreate:
type: object
required:
- name
additionalProperties: false
properties:
name:
type: string
minLength: 1
description: Key name for identification.
example: CI/CD Pipeline
project_id:
type: string
x-naturali-ref: projects
description: Project to scope the key to. Omit for an account-scoped key.
example: proj_V1StGXR8Z5jdHi6B
capabilities:
type: array
items:
type: string
description: 'Capabilities to narrow the key to. Omit for none, or for the caller''s own set when the caller is a narrowed key.
'
example:
- agents:ListAgents
- agents:CreateSession
ApiKeyRecord:
type: object
properties:
id:
type: string
description: Public API key ID (key_ prefix).
example: key_V1StGXR8Z5jdHi6B
name:
type: string
description: Human-readable label.
example: CI/CD Pipeline
key_prefix:
type: string
description: Leading characters of the raw key, for identification.
example: nat_sk_a1b2c3
scope:
type: string
enum:
- project
- account
description: Whether the key is scoped to one project or the whole account.
example: project
project_id:
type:
- string
- 'null'
x-naturali-ref: projects
description: The project this key is scoped to; null for account-scoped keys.
example: proj_V1StGXR8Z5jdHi6B
capabilities:
type: array
description: 'The capabilities this key is narrowed to, each the one an operation needs (`<module>:<OperationId>`); a call outside them is `403`. Empty means the key reaches whatever its holder''s membership reaches.
'
items:
type: string
example:
- agents:ListAgents
- agents:CreateSession
created_at:
type: string
format: date-time
example: '2026-07-17T00:00:00.000Z'
last_used_at:
type:
- string
- 'null'
format: date-time
description: When the key was last presented; null if never used.
example: '2026-07-17T09:12:00.000Z'
required:
- id
- name
- key_prefix
- scope
- capabilities
- created_at
ApiKeyCreated:
allOf:
- $ref: '#/components/schemas/ApiKeyRecord'
- type: object
required:
- key
properties:
key:
type: string
description: The raw API key value (only returned once, at creation or rotation). Use as the Bearer token.
example: nat_sk_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
ApiKeyUpdate:
type: object
description: At least one field must be present. Scope is immutable.
minProperties: 1
additionalProperties: false
properties:
name:
type: string
minLength: 1
example: Renamed Key
capabilities:
type: array
items:
type: string
description: Replace the capability set; an empty array removes the narrowing.
example:
- agents:ListAgents
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A naturali API key (nat_sk_…) or a session JWT.
oauth2:
type: oauth2
description: 'A connected app''s OAuth access token, issued by this API''s authorization server (discovery: /.well-known/oauth-authorization-server). Its one scope carries every operation, confined to the projects the user chose when approving the app.'
flows:
authorizationCode:
authorizationUrl: https://api.naturali.ai/authorize
tokenUrl: https://api.naturali.ai/token
refreshUrl: https://api.naturali.ai/token
scopes:
mcp:access: Every operation this API serves, on the projects the grant covers.