Custom LLM API

Manage your private LLM integrations on Convai. Register, update, or delete OpenAI-compatible custom models securely through simple API endpoints.

Introduction

The Convai Custom LLM Models API allows developers and enterprises to register and manage their own custom large language models (LLMs) on the Convai platform. With these endpoints, you can connect private, OpenAI-compatible LLMs, control access, and manage lifecycle events such as registration, updates, and removal.

All endpoints are POST requests and both accept and return JSON objects.


Base URL


Authentication

Each request must include your Convai API key in the header. Without it, requests return 401 Unauthorized.

Header
Description
Example

CONVAI-API-KEY

Required on every request

245a4u6864dj6848516l2dr6df

Example error for missing/invalid key:


Common Response Fields

All endpoints share the following base structure in their responses.

Field
Type
Description

status

string

"success" or "error"

message

string

Human-readable summary

transactionID

string

Unique identifier for tracing

...

Endpoint-specific data


Endpoint Reference

#
Method & Path
Purpose

POST /llm-models/register

Register a new custom model

POST /llm-models/update

Update an existing custom model

POST /llm-models/deregister

Remove a registered model

POST /llm-models/list

List all custom models linked to your API key


2.1 Register a Model

Endpoint:

POST https://api.convai.com/llm-models/register

Request Body

Field
Type
Required
Notes

model_group_name

string

Unique, immutable identifier

model_name

string

Model name, e.g., "gpt-4o-mini"

api_key

string

Secret key for the remote LLM endpoint

is_uncensored

boolean

True if jailbreak-free

display_name

string

Optional UI label (defaults to group name)

base_url

string

OpenAI-compatible endpoint (default: https://api.openai.com/v1)

Example cURL

Success Response (200 OK)

Possible Errors

Code
Message
Cause

400

Missing required field

Validation failure

409

Model group name already exists

Duplicate identifier

500

Database error

Internal server error


2.2 Update a Model

Endpoint:

POST https://api.convai.com/llm-models/update

Request Body

Field
Type
Required
Notes

model_group_name

string

Model to update

display_name

string

New friendly name

base_url

string

Updated endpoint URL

api_key

string

New API secret

is_uncensored

boolean

Toggle censorship

At least one optional field is required.

Example cURL

Success Response (200 OK)

Possible Errors

Code
Message
Cause

404

Model not found

Invalid or unauthorized model name

409

Display name already exists

Duplicate user label

400

No valid fields to update

Missing updatable fields


2.3 Deregister a Model

Endpoint:

POST https://api.convai.com/llm-models/deregister

Request Body

Field
Type
Required

model_group_name

string

Example cURL

Success Response (200 OK)

Possible Errors

Code
Message
Cause

404

Model not found

Model does not exist or is not owned by the requester


2.4 List Models

Endpoint:

POST https://api.convai.com/llm-models/list

This endpoint requires no request body.

Example cURL

Success Response (200 OK)


3. Error Reference (All Endpoints)

HTTP Code
Typical Reason

400

Missing or malformed parameters

401

Invalid or missing API key

404

Model not found or not owned by user

409

Duplicate group or display name

429

Rate limit exceeded

500

Internal server error

Example Error:


4. Usage Notes & Best Practices


Conclusion

The Custom LLM API provides a streamlined way to integrate, manage, and control custom LLM endpoints within Convai. By maintaining unique identifiers, secure API keys, and OpenAI-compatible URLs, you ensure stable and private model deployments for your use-case.

Last updated

Was this helpful?