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/v1

Authentication

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.

bash
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.

GET/models
json
{
  "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.

POST/chat/completions

Request Body

ParameterTypeDescription
model*stringID of the model to use (e.g., "gpt-4o").
messages*arrayA list of messages comprising the conversation so far.
temperaturenumberSampling temperature between 0 and 2.
streambooleanIf set, partial message deltas will be sent.

Example

bash
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.

POST/embeddings
bash
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.

POST/images/generations
bash
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.

CodeDescription
401Authentication failed (Invalid API key)
402Insufficient credits
429Rate limit exceeded
500Internal server error