NinjaChat Models API
The Models API from NinjaChat — 2 operation(s) for models.
The Models API from NinjaChat — 2 operation(s) for models.
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/ninjachat-ai:ninjachat-ai-models-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: NinjaChat Models API
version: 1.0.0
description: Clean-break NinjaChat v1. Chat and Responses bill actual token usage; images and videos use catalog unit pricing.
servers:
- url: https://www.ninjachat.ai/api/v1
tags:
- name: Models
paths:
/models:
get:
summary: List live models
security: []
responses:
'200':
description: Runtime catalog data, capabilities, provider rails, availability, and prices.
content:
application/json:
schema:
$ref: '#/components/schemas/ModelListResponse'
x-codeSamples:
- lang: javascript
label: TypeScript SDK
source: 'import { NinjaChat } from "@ninjachat/sdk";
const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });
const models = await client.models.list();
console.log(models.data);'
- lang: python
label: Python SDK
source: 'import os
from ninjachat import NinjaChat
client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"])
models = client.models.list()
print(models["data"])'
x-ninjachat-status: current
tags:
- Models
operationId: getModels
x-operation-id-source: derived
/models/{id}:
get:
summary: Get a live model
security: []
parameters:
- schema:
type: string
required: true
name: id
in: path
- schema:
type: string
enum:
- history
required: false
name: include
in: query
- schema:
type: integer
minimum: 1
maximum: 90
required: false
name: days
in: query
responses:
'200':
description: Runtime model detail with optional daily provider performance history. No platform request, token, user or spend counts are exposed.
content:
application/json:
schema:
$ref: '#/components/schemas/PublicModel'
'404':
description: Model not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-codeSamples:
- lang: javascript
label: TypeScript SDK
source: 'import { NinjaChat } from "@ninjachat/sdk";
const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });
const model = await client.models.retrieve("ninja/auto");
console.log(model);'
- lang: python
label: Python SDK
source: 'import os
from ninjachat import NinjaChat
client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"])
model = client.models.retrieve("ninja/auto")
print(model)'
x-ninjachat-status: current
tags:
- Models
operationId: getModelsById
x-operation-id-source: derived
components:
schemas:
PublicModelHistoryRow:
type: object
properties:
date:
type: string
provider:
type: string
successRate:
type:
- number
- 'null'
p50Ms:
type:
- number
- 'null'
p95Ms:
type:
- number
- 'null'
p99Ms:
type:
- number
- 'null'
medianTtftMs:
type:
- number
- 'null'
tokensPerSec:
type:
- number
- 'null'
completionRate:
type:
- number
- 'null'
medianGenerationMs:
type:
- number
- 'null'
required:
- date
- provider
- successRate
- p50Ms
- p95Ms
- p99Ms
- medianTtftMs
- tokensPerSec
- completionRate
- medianGenerationMs
additionalProperties: false
ErrorResponse:
type: object
properties:
error:
type: object
properties:
message:
type: string
type:
type: string
code:
type: string
param:
type:
- string
- 'null'
required:
- message
- type
- code
additionalProperties: false
required:
- error
additionalProperties: false
ModelListResponse:
type: object
properties:
object:
type: string
enum:
- list
data:
type: array
items:
$ref: '#/components/schemas/PublicModel'
total:
type: integer
minimum: 0
generated_at:
type: string
format: date-time
required:
- object
- data
- total
- generated_at
additionalProperties: false
PublicModel:
type: object
properties:
object:
type: string
enum:
- model
created:
type: integer
owned_by:
type: string
id:
type: string
minLength: 1
maxLength: 160
name:
type: string
modality:
type: string
enum:
- text
- image
- image_edit
- video
- audio
- embedding
- rerank
- search
status:
type: string
enum:
- preview
- ga
- deprecated
- retired
servable:
type: boolean
description:
type: string
capabilities:
type: array
items:
type: string
contextWindow:
type: number
maxOutputTokens:
type: number
pricing:
type: object
properties:
unit:
type: string
enum:
- token
- image
- second
- request
- character
typicalRequestUsd:
type: number
minimum: 0
meteredPromptPerToken:
type: number
minimum: 0
meteredCachedPromptPerToken:
type: number
minimum: 0
meteredCacheWritePromptPerToken:
type: number
minimum: 0
meteredCompletionPerToken:
type: number
minimum: 0
perRequestUsd:
type: number
minimum: 0
perUnitUsd:
type: number
minimum: 0
listPerUnitUsd:
type: number
minimum: 0
promotion:
type: object
properties:
label:
type: string
discountPercent:
type: number
exclusiveMinimum: 0
maximum: 100
startsAt:
type: string
format: date-time
endsAt:
type: string
format: date-time
required:
- label
- discountPercent
- startsAt
- endsAt
additionalProperties: false
priceDrop:
type: object
properties:
label:
type: string
droppedAt:
type: string
format: date-time
showUntil:
type: string
format: date-time
required:
- label
- droppedAt
- showUntil
additionalProperties: false
required:
- unit
additionalProperties: false
providers:
type: array
items:
type: object
properties:
provider:
type: string
providerDisplayName:
type: string
upstreamModelId:
type: string
role:
type: string
enum:
- primary
- fallback
- emergency
available:
type: boolean
unsupportedCapabilities:
type: array
items:
type: string
enum:
- tools
- vision
- json_mode
- streaming
trainsOnData:
type: boolean
zeroRetentionAvailable:
type: boolean
contextWindow:
type: number
maxOutputTokens:
type: number
performance:
type:
- object
- 'null'
properties:
successRate:
type:
- number
- 'null'
p50Ms:
type:
- number
- 'null'
p95Ms:
type:
- number
- 'null'
medianTtftMs:
type:
- number
- 'null'
required:
- successRate
- p50Ms
- p95Ms
- medianTtftMs
additionalProperties: false
required:
- provider
- providerDisplayName
- upstreamModelId
- role
- available
additionalProperties: false
supportedParameters:
type: array
items:
type: string
brand:
type: string
virtual:
type: boolean
pricingNote:
type: string
overlay:
type: object
properties:
isOverlay:
type: boolean
dispatch:
type: string
enum:
- live
- pending
overrideStatus:
type: string
required:
- isOverlay
- dispatch
additionalProperties: false
history:
type: array
items:
$ref: '#/components/schemas/PublicModelHistoryRow'
required:
- object
- created
- owned_by
- id
- name
- modality
- status
- servable
- capabilities
- pricing
- providers
- supportedParameters
- brand
additionalProperties: false
securitySchemes:
managementKey:
type: http
scheme: bearer
bearerFormat: nj_mk_...
description: Account-scoped management credential created by the account owner after email verification. Inference keys cannot access these endpoints; management keys cannot run inference.
anthropicApiKey:
type: apiKey
in: header
name: x-api-key
description: NinjaChat API key accepted by the Anthropic Messages compatibility endpoint.
bearerAuth:
type: http
scheme: bearer
bearerFormat: NinjaChat API key
description: Use an API key created in the NinjaChat developer console.
x-ninjachat-contract-sha256: df530775ec7be5779917a6c4c5b6015b760809e62fd002827541bf6cac66310e