Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.
openapi: 3.2.0
info:
version: 0.9.10
title: Ludo.ai API Keys API
servers:
- url: /api
tags:
- name: API Keys
paths:
/user/api-keys:
get:
summary: 'Lists the user''s API keys (Roles: user)'
tags:
- API Keys
operationId: listApiKeys
security:
- Bearer: []
x-security-scopes:
- user
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ApiKeyInfo'
'400':
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
summary: 'Creates a named API key; the key is returned once (Roles: user)'
tags:
- API Keys
operationId: createApiKey
security:
- Bearer: []
x-security-scopes:
- user
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CreatedApiKey'
'402':
description: The plan has no API access
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Too many keys
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateApiKeyPayload'
required: true
/user/api-keys/{id}:
delete:
summary: 'Revokes one of the user''s API keys (Roles: user)'
tags:
- API Keys
operationId: revokeApiKey
security:
- Bearer: []
x-security-scopes:
- user
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/OkResponse'
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
ApiKeyInfo:
type: object
properties:
id:
type: string
name:
type: string
source:
type: string
enum:
- web
- cli
last4:
type: string
description: Last four characters of the key; null for keys created before named keys existed.
platform:
type: string
created_at:
type: integer
format: int64
last_used_at:
type: integer
format: int64
OkResponse:
type: object
properties:
ok:
type: boolean
ErrorResponse:
type: object
properties:
message:
type: string
metadata:
type: string
error_payload:
type: string
intent:
type: object
description: Stripe intent details sent with 3D Secure (406) errors
properties:
id:
type: string
type:
type: string
enum:
- payment
- setup
client_secret:
type: string
CreateApiKeyPayload:
type: object
required:
- name
properties:
name:
type: string
minLength: 1
maxLength: 64
CreatedApiKey:
type: object
properties:
id:
type: string
name:
type: string
source:
type: string
last4:
type: string
created_at:
type: integer
format: int64
api_key:
type: string
description: The key. Shown only in this response.
securitySchemes:
ApiKey:
type: apiKey
name: Authorization
in: header
description: 'For accessing the API a valid API Key token must be passed in all the queries in
the ''Authorization'' header.
The following syntax must be used in the ''Authorization'' header: ApiKey xxxxxx.yyyyyyy.zzzzzz
'
Bearer:
type: apiKey
name: Authorization
in: header
description: 'For accessing the API a valid JWT token must be passed in all the queries in
the ''Authorization'' header.
A valid JWT token is generated by the API and retourned as answer of a call
to the route /login giving a valid user & password.
The following syntax must be used in the ''Authorization'' header: Bearer xxxxxx.yyyyyyy.zzzzzz
'