Secure AI Chat Completions API
The Chat Completions API from Secure AI — 1 operation(s) for chat completions.
The Chat Completions API from Secure AI — 1 operation(s) for chat completions.
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/secureai-one:secureai-one-chat-completions-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: Secure AI Chat API
version: 1.0.0
description: 'Data loss prevention for AI agents. Inspects what an agent is about to do — the tool call, with its arguments — and allows, redacts or blocks it according to rules the account holds. Every inspected action is logged as kinds and locations, never as values.
The detector half is still here on its own: /redact swaps the people in a piece of text for plausible stand-ins before it reaches a model, and /restore puts them back.'
contact:
url: https://secureai.one/developers
servers:
- url: https://secureai.one/v1
security:
- apiKey: []
tags:
- name: Chat Completions
paths:
/chat/completions:
post:
operationId: chatCompletion
summary: The same, using our models
description: As the proxy, but answered by our own provider accounts and metered against a prepaid balance. No X-Provider-Key. The model may be omitted, in which case one is chosen by how hard the question is.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatRequest'
responses:
'200':
description: An OpenAI chat completion
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletion'
'401':
$ref: '#/components/responses/Unauthorized'
'402':
$ref: '#/components/responses/PaymentRequired'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
tags:
- Chat Completions
components:
responses:
Unauthorized:
description: No API key, or one that is not recognised
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
PaymentRequired:
description: No API access on this account, or out of balance. The code says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: The plan does not include that model
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: 60 requests a minute per key, or a spending cap reached
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
ChatCompletion:
type: object
properties:
id:
type: string
object:
type: string
const: chat.completion
created:
type: integer
model:
type: string
choices:
type: array
items:
type: object
properties:
index:
type: integer
message:
type: object
properties:
role:
type: string
content:
type: string
finish_reason:
type: string
enum:
- stop
- length
usage:
type: object
properties:
prompt_tokens:
type: integer
completion_tokens:
type: integer
total_tokens:
type: integer
ChatRequest:
type: object
required:
- messages
properties:
model:
type: string
description: Required on the proxy; optional on /chat/completions.
messages:
type: array
items:
type: object
properties:
role:
type: string
enum:
- system
- developer
- user
- assistant
- tool
content:
type:
- string
- 'null'
tool_calls:
type: array
description: An assistant turn's earlier tool calls, as you received them.
items:
type: object
properties:
id:
type: string
type:
type: string
enum:
- function
function:
type: object
properties:
name:
type: string
arguments:
type: string
description: JSON
tool_call_id:
type: string
description: 'On a role "tool" message: the call it answers.'
stream:
type: boolean
default: false
map:
type: object
additionalProperties:
type: string
allow:
type: array
items:
type: string
strict:
type: boolean
default: false
tools:
type: array
description: /chat/completions only. Functions the model may call; calls come back with real values in their arguments, decided by the account's policy.
items:
type: object
required:
- type
- function
properties:
type:
type: string
enum:
- function
function:
type: object
required:
- name
properties:
name:
type: string
pattern: ^[a-zA-Z0-9_-]{1,64}$
description:
type: string
parameters:
type: object
description: JSON Schema for the arguments
tool_choice:
description: '"auto", "none", "required", or {"type":"function","function":{"name":...}}'
oneOf:
- type: string
enum:
- auto
- none
- required
- type: object
Error:
type: object
properties:
error:
type: object
properties:
message:
type: string
type:
type: string
code:
type:
- string
- 'null'
param:
type:
- string
- 'null'
securitySchemes:
apiKey:
type: http
scheme: bearer
description: A key created in Settings → Developer. Shown once; what is stored is its SHA-256.