NeuralNet API

Integrate state-of-the-art AI models into your applications with a single, unified API.

Welcome to the NeuralNet API documentation. Our platform provides a standardized interface to access a wide range of Large Language Models (LLMs), including GPT-4, Claude 3, and open-source alternatives like Llama 3 and Mistral.

Our API is fully compatible with the OpenAI SDK, making it incredibly easy to switch or integrate if you're already familiar with the ecosystem.

Authentication

All API requests require an API key. You can obtain your API key from the Account Dashboard.

⚠️
Keep your key secret!

Your API key carries the same privileges as your user account. Do not share it or commit it to public repositories.

HEADER
Authorization: Bearer YOUR_API_KEY

Making Requests

The base URL for all API requests is:

https://neuralnet.pages.dev/api/v1
1

Set Headers

Include Content-Type: application/json and your Authorization header.

2

Select Model

Choose a model ID from the Models List.

3

Send Request

Make a POST request to /chat/completions with your messages array.

CURL
curl https://neuralnet.pages.dev/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4-turbo",
    "messages": [
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'

Available Models

We support a variety of models. Visit the Models Catalog for a full interactive list.

GPT-4 Turbo

OpenAI
gpt-4-turbo
Context 128K
Cost $10/1M

Claude 3 Opus

Anthropic
claude-3-opus
Context 200K
Cost $15/1M

Llama 3 70B

Meta
meta-llama/llama-3-70b-instruct
Context 8K
Cost $0.9/1M

Error Handling

Code Description Solution
400 Bad Request Check your JSON body and required fields.
401 Unauthorized Verify your API key is correct and active.
429 Rate Limit You are sending too many requests. Slow down.