API Quickstart
Get your first API call running in 5 minutes.
Prerequisites
- THOX.ai device powered on and connected to your network
- Device showing green LED (ready state)
- Computer on the same network as the device
Verify Connection
First, verify that your device is accessible on the network:
# Check if device is reachable
curl http://thox.local:8080/health
# Expected response:
{"status": "healthy", "version": "1.2.0"}
If thox.local doesn't resolve, use your device's IP address instead (check your router's DHCP client list).
List Available Models
See what models are available on your device:
curl http://thox.local:8080/v1/models
# Response:
{
"data": [
{
"id": "thox-coder",
"object": "model",
"owned_by": "thoxai"
},
{
"id": "thox-chat",
"object": "model",
"owned_by": "thoxai"
}
]
}Make Your First Request
Using cURL
curl http://thox.local:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "thox-coder",
"messages": [
{"role": "user", "content": "Write a hello world in Python"}
]
}'Using Python
import requests
response = requests.post(
"http://thox.local:8080/v1/chat/completions",
json={
"model": "thox-coder",
"messages": [
{"role": "user", "content": "Write a hello world in Python"}
]
}
)
print(response.json()["choices"][0]["message"]["content"])Using JavaScript/Node.js
const response = await fetch('http://thox.local:8080/v1/chat/completions', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
model: 'thox-coder',
messages: [
{ role: 'user', content: 'Write a hello world in Python' }
]
})
});
const data = await response.json();
console.log(data.choices[0].message.content);Enable Streaming
For real-time token-by-token output, enable streaming:
import requests
response = requests.post(
"http://thox.local:8080/v1/chat/completions",
json={
"model": "thox-coder",
"messages": [
{"role": "user", "content": "Explain async/await"}
],
"stream": True
},
stream=True
)
for line in response.iter_lines():
if line:
print(line.decode())Next Steps
CONFIDENTIAL AND PROPRIETARY INFORMATION
This documentation is provided for informational and operational purposes only. The specifications and technical details herein are subject to change without notice. THOX.ai LLC reserves all rights in the technologies, methods, and implementations described.
Nothing in this documentation shall be construed as granting any license or right to use any patent, trademark, trade secret, or other intellectual property right of THOX.ai LLC, except as expressly provided in a written agreement.
Patent Protection
The MagStack™ magnetic stacking interface technology is proprietary technology of THOX.ai LLC, protected by trade secrets and intellectual property laws....
Reverse Engineering Prohibited
You may not reverse engineer, disassemble, decompile, decode, or otherwise attempt to derive the source code, algorithms, data structures, or underlying ideas of any THOX.ai hardwa...
THOX.ai™, ThoxOS™, MagStack™, MeshStack™, ThoxMigrate™, the THOX Edge Series™, the THOX Nova Series™, and the THOX.ai logo are trademarks or registered trademarks of THOX.ai LLC in the United States and other countries. WireGuard® is a registered trademark of Jason A. Donenfeld.
All other trademarks are the property of their respective owners.
© 2026 THOX.ai LLC. All Rights Reserved.