Skip to main content

Documentation Index

Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt

Use this file to discover all available pages before exploring further.

Newapi provides a complete RESTful API split into two categories: AI Model APIs for calling AI capabilities such as chat, images, and audio, and Management APIs for administering tokens, channels, users, and logs. All requests go to your Newapi instance at https://YOUR_NEWAPI_BASE_URL.
You can test and debug all API endpoints interactively in the Apifox playground.

AI Model APIs

AI Model APIs are compatible with the OpenAI API format. Use your sk- token from Token Management to authenticate these requests.

Chat completions

Create model responses from a conversation history. Supports streaming.

Completions

Traditional text completion for a given prompt.

Embeddings

Generate text embedding vectors for search and semantic similarity.

Images

Generate and edit images with AI models.

Audio

Convert text to speech and transcribe audio files.

Videos

Generate videos using AI models through a unified API.

Moderations

Check content against safety policies.

Rerank

Rerank documents by relevance to a query.

Models

List the models available on your Newapi instance.

Management APIs

Management APIs control system configuration, user accounts, and business operations. Use a system access token or session cookie to authenticate these requests. See Authentication for details.

Tokens

Create, update, and delete API tokens for users and applications.

Channels

Configure upstream AI provider channels and their routing rules.

Users

Manage user accounts, balances, and permissions.

Logs

Query request logs and usage records.

Payment

Manage top-ups and billing information.

Base URL

All API requests are sent to your Newapi instance:
https://YOUR_NEWAPI_BASE_URL
  • AI Model API endpoints are at /v1/... (for example, /v1/chat/completions)
  • Management API endpoints are at /api/... (for example, /api/token/)