API Documentation
Introduction
The WavexAI API aims to follow standard "OpenAI" style endpoints that have become the industry standard, much like vLLM, Ollama, or llama.cpp
Quick Start
To begin with the WavexAI API, you first need to generate an API key in your Settings. Once you have your key, you can attach it any style POST request in an API call. See examples below
Chat Completions
POST /v1/chat/completions — send a conversation, get a reply. Currently, the only available endpoint for the WavexAI API is /v1/chat/completions, which allows you to complete chats in a streaming format. You can specifically request non-streaming by adding "streaming":"false" to your API calls (See Python Example above).
| Field | Type | Description |
|---|---|---|
| model | string | Must be `WavexSoftware/WavexAI` |
| max_tokens | number | The number of tokens the API will respond with, e.g. 8192 |
| messages | array | Your prompt to the API |
| temperature | number | 0–1, default .2 |
| stream | boolean | Stream tokens via SSE. Defaults to True |
Examples:
curl https://api.wavexai.dev/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <api_key>" \
-d '{
"model": "WavexSoftware/WavexAI",
"max_tokens": 8192,
"temperature": 0.2,
"messages": [
{"role": "user", "content": "Hello, how are you?"}
]
}'Or in Python:
import requests
response = requests.post(
"https://api.wavexai.dev/v1/chat/completions",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer <api_key>",
},
json={
"model": "WavexSoftware/WavexAI",
"max_tokens": 8192,
"temperature": 0.2,
"stream": False,
"messages": [
{"role": "user", "content": "Hello, how are you?"}
],
},
timeout=120,
)
response.raise_for_status()
result = response.json()
print(result["choices"][0]["message"]["content"])OpenCode Integration
The recommended coding tool for WavexAI is the OpenCode Terminal, which is an open-source, TUI style coding interface that can integrate directly with your IDE or Terminal.
Given OpenCode is model-agnostic, it provides an amazing interface for using WavexAI in conjuction with other frontier model providers.
Once you have OpenCode installed, you can drop the below config into your opencode.json file and update your API Key, to start using WavexAI with OpenCode.
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"read": "allow",
"edit": "ask",
"bash": "ask"
},
"provider": {
"myprovider": {
"npm": "@ai-sdk/openai-compatible",
"name": "WavexAI",
"options": {
"baseURL": "https://api.wavexai.dev/v1",
"apiKey": "<api_key>"
},
"models": {
"WavexSoftware/WavexAI": {
"name": "WavexAI Model",
"options": {
"max_tokens": 8192,
"temperature": 0.2
}
}
}
}
}
}