Introduction
Welcome to the NeXeonAI API documentation. Our platform provides a unified, high-performance interface for accessing the world's most advanced Large Language Models (LLMs).
Designed for developers, the API is fully compatible with the OpenAI SDK specification, meaning you can integrate it into existing applications with just a few lines of code configuration.
Base URL
https://api.nexeonai.com/v1Authentication
The API uses API keys for authentication. You can create and manage your API keys in the Dashboard.
Authentication is performed via the HTTP Authorization header. Provide your API key as a Bearer token.
curl https://api.nexeonai.com/v1/models \
-H "Authorization: Bearer nex-sk-..."List Models
Lists the currently available models, providing basic information such as the owner and availability status.
{
"object": "list",
"data": [
{
"id": "gpt-4o",
"object": "model",
"created": 1686935002,
"owned_by": "openai"
},
{
"id": "claude-3-5-sonnet",
"object": "model",
"created": 1718841600,
"owned_by": "anthropic"
}
]
}Chat Completions
Creates a model response for the given chat conversation. This is the primary endpoint for interacting with LLMs.
Request Body
| Parameter | Type | Description |
|---|---|---|
| model* | string | ID of the model to use (e.g., "gpt-4o"). |
| messages* | array | A list of messages comprising the conversation so far. |
| temperature | number | Sampling temperature between 0 and 2. |
| stream | boolean | If set, partial message deltas will be sent. |
Example
curl https://api.nexeonai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
}'Embeddings
Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
curl https://api.nexeonai.com/v1/embeddings \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"input": "The food was delicious and the waiter...",
"model": "text-embedding-3-small"
}'Image Generation
Creates an image given a prompt.
curl https://api.nexeonai.com/v1/images/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
"prompt": "A futuristic city at sunset",
"n": 1,
"size": "1024x1024"
}'Streaming
NeXeonAI supports streaming responses for Chat Completions. When stream is set to true, the API will send server-sent events (SSE) containing partial message deltas.
SDK Usage
If you are using the official OpenAI SDKs, streaming is handled automatically when you pass stream=True.
Errors
The API uses standard HTTP response codes to indicate the success or failure of an API request.
| Code | Description |
|---|---|
| 401 | Authentication failed (Invalid API key) |
| 402 | Insufficient credits |
| 429 | Rate limit exceeded |
| 500 | Internal server error |