NEURAL API DOCS

Interface with the quantum inference network

QUICK START PROTOCOL

1. ACQUIRE ACCESS TOKEN

Navigate to your dashboard and generate an API key. This neural access token grants you entry to the inference matrix.

2. INITIALIZE CONNECTION

Configure your neural interface with the base endpoint:

bash
https://api.goodchameleon.com/v1/chat/completions

3. TRANSMIT DATA PACKET

Send your neural payload with proper authentication headers:

bash
curl -X POST https://api.goodchameleon.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_your_api_key" \
  -d '{
    "model": "qwen3.5-35b",
    "messages": [{"role": "user", "content": "Analyze the quantum flux patterns"}],
    "max_tokens": 150
  }'

AUTHENTICATION MATRIX

API KEY AUTHENTICATION

All requests must include your API key in the header:

bash
Authorization: Bearer sk_your_api_key

✅ VALID REQUEST

200 OK - Neural connection established

❌ INVALID REQUEST

401 Unauthorized - Access denied

API REFERENCE MANUAL

POST/v1/inference

Execute inference through the neural network matrix.

REQUEST PARAMETERS

ParameterTypeRequiredDescription
promptstringNeural input sequence
modelstringAI model identifier (default: gpt-3.5-turbo)
max_tokensintegerMaximum response length (default: 300)

RESPONSE FORMAT

json
{
  "completion": "Neural response data stream...",
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 45,
    "total_tokens": 57
  },
  "latency_ms": 245,
  "model": "gpt-3.5-turbo"
}

ERROR DIAGNOSTIC CODES

401UNAUTHORIZED

Missing or invalid API key detected

403FORBIDDEN

API key has been revoked or suspended

429QUOTA_EXCEEDED

Rate limit or token quota exceeded

500NEURAL_ERROR

Inference network malfunction detected

NEURAL INTERFACE LIBRARIES

JavaScript

javascript
const response = await fetch(
  'https://api.goodchameleon.com/v1/chat/completions',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer sk_your_key'
    },
    body: JSON.stringify({
      model: 'qwen3.5-35b',
      messages: [{ role: 'user', content: 'Hello, world!' }]
    })
  }
)

Python

python
import requests

response = requests.post(
    'https://api.goodchameleon.com/v1/chat/completions',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer sk_your_key'
    },
    json={
        'model': 'qwen3.5-35b',
        'messages': [{'role': 'user', 'content': 'Hello, world!'}]
    }
)

Go

go
req, _ := http.NewRequest(
    "POST",
    "https://api.goodchameleon.com/v1/chat/completions",
    strings.NewReader(jsonData)
)

req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer sk_your_key")

client := &http.Client{}
resp, _ := client.Do(req)