Custom LLM API
Manage your private LLM integrations on Convai. Register, update, or delete OpenAI-compatible custom models securely through simple API endpoints.
Custom LLM integrations are available only on the Enterprise Plan.
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.
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.
status
string
"success" or "error"
message
string
Human-readable summary
transactionID
string
Unique identifier for tracing
...
—
Endpoint-specific data
Endpoint Reference
2.1 Register a Model
Endpoint:
POST https://api.convai.com/llm-models/register
Request Body
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
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
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
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
model_group_name
string
✓
Example cURL
Success Response (200 OK)
Possible Errors
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)
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
Convai currently supports only OpenAI-compatible endpoints. Most major providers (OpenAI, Google, Cohere, Hugging Face, vLLM, SGlang) support this format.
model_group_name is immutable; choose carefully (e.g., llama3.1-70b-companyX instead of generic names).
display_name values must be unique per user.
Before using deregister for a model, make sure that all characters using the model have been switched to another model, or they will not work.
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?