NovelAI /ai/module/ API
The /ai/module/ API from NovelAI — 3 operation(s) for /ai/module/.
The /ai/module/ API from NovelAI — 3 operation(s) for /ai/module/.
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/novelai-ai-module-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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. 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: NovelAI Primary /ai/module/ API
description: The Primary API describes actions that our Frontend makes against the NovelAI backend.
version: '1.0'
contact: {}
servers:
- url: https://api.novelai.net
description: NovelAI Primary API
tags:
- name: /ai/module/
paths:
/ai/module/all:
get:
operationId: AIModuleController_allModules
summary: AI module controller all modules
description: 'description: "Access Token is incorrect.",
type: ApiError,
})
status: HttpStatus.PAYMENT_REQUIRED,
description: "An active subscription required to access this endpoint.",
type: ApiError,
})
description: "A conflict error occured.",
type: ApiError,
})
description: "The training request has been successfully sent.",
type: AiModuleDto,
})
description: "A validation error occured.",
type: ApiError,
})
async trainModule(
): Promise {
const user: User = req.user;
if (!aiTrainingRequest)
throw new HttpException("Incorrect body.", HttpStatus.BAD_REQUEST);
if (
!GenerationModelAccessRightsData[aiTrainingRequest.model].canTrainModules
)
throw new HttpException(
"Specified model does not support module training.",
HttpStatus.BAD_REQUEST,
);
if (!user.hasSubscription())
throw new HttpException(
"Incorrect subscription.",
HttpStatus.PAYMENT_REQUIRED,
);
if (aiTrainingRequest.steps item.status == "pending" || item.status == "training");
if (modules.length >= MAX_SIMULTANEOUS_TRAINING_MODULES)
throw new HttpException(
"You have reached the limit of concurrently training modules.",
HttpStatus.CONFLICT,
);
}
return await this.aiModuleService.trainModule(user, aiTrainingRequest);
}'
parameters: []
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AiModuleDto'
'401':
description: Access Token is incorrect.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: An unknown error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- /ai/module/
security:
- bearer: []
x-summary-source: derived
/ai/module/{id}:
get:
operationId: AIModuleController_getModule
parameters:
- name: id
required: true
in: path
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AiModuleDto'
'401':
description: Access Token is incorrect.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Module not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: An unknown error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- /ai/module/
security:
- bearer: []
summary: AI module controller get module
x-summary-source: derived
delete:
operationId: AIModuleController_deleteModule
parameters:
- name: id
required: true
in: path
schema:
type: string
responses:
'200':
description: Module deleted successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/AiModuleDto'
'401':
description: Access Token is incorrect.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Module not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'409':
description: A conflict error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: An unknown error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- /ai/module/
security:
- bearer: []
summary: AI module controller delete module
x-summary-source: derived
/ai/module/buy-training-steps:
post:
operationId: AIModuleController_buyTrainingSteps
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BuyTrainingStepsRequest'
responses:
'200':
description: Steps have been purchased properly.
'400':
description: A validation error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Access Token is incorrect.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'409':
description: A conflict occured while buying training steps.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: An unknown error occured.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
tags:
- /ai/module/
security:
- bearer: []
summary: AI module controller buy training steps
x-summary-source: derived
components:
schemas:
AiModuleDto:
type: object
properties:
data:
type: string
description: Base64-encoded data if ready or it's a training request, error text if error
lr:
type: number
description: Learning rate
steps:
type: number
description: Training steps
model:
type: string
description: Used text generation model for module training
default: euterpe-v2
lastUpdatedAt:
type: number
description: UNIX timestamp
status:
type: string
enum:
- pending
- training
- ready
- error
lossHistory:
description: Recorded loss values
type: array
items:
type: number
id:
type: string
name:
type: string
maxLength: 64
description:
type: string
maxLength: 256
required:
- data
- lr
- steps
- model
- lastUpdatedAt
- status
- lossHistory
- id
- name
- description
ApiError:
type: object
properties:
statusCode:
type: number
message:
type: string
required:
- statusCode
- message
BuyTrainingStepsRequest:
type: object
properties:
amount:
type: integer
minimum: 2000
maximum: 10000
description: Amount of module training steps to purchase.
required:
- amount
securitySchemes:
bearer:
scheme: bearer
bearerFormat: JWT
type: http