Request fields
| Field |
Type |
Required |
Description |
| message |
string |
optional |
The simplest way to send one user message. |
| prompt |
string |
optional |
Alias for message. You can use either message or prompt. |
| messages |
array |
optional |
Advanced format for multi-turn conversations. |
| system |
string |
optional |
Optional system instruction for the assistant. |
Simple request
{
"message": "Hello, what can this API do?"
}
Advanced request
{
"system": "You are a helpful assistant.",
"messages": [
{
"role": "user",
"content": "Explain this API in one sentence."
}
]
}
PowerShell
Invoke-RestMethod -Method Post -Uri "https://ai.280108.xyz/v1/messages" -Headers @{"x-api-key"="YOUR_API_KEY"} -ContentType "application/json" -Body '{"message":"Hello from the API"}'
curl.exe
curl.exe -X POST "https://ai.280108.xyz/v1/messages" -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" -d "{\"message\":\"Hello from the API\"}"
JavaScript
const response = await fetch("https://ai.280108.xyz/v1/messages", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
message: "Hello from the API"
})
});
const data = await response.json();
console.log(data);
Example response
{
"id": "280108-a3f8c21d94b06e7f3a2c1d05",
"role": "assistant",
"content": [
{
"type": "text",
"text": "Hello! How can I help?"
}
],
"model": "280108-AI/standard",
"stop_reason": "end_turn"
}
Errors
| Status |
Name |
Description |
| 400 |
Bad Request |
The JSON body is invalid or missing required content. |
| 401 |
Unauthorized |
The API key is missing or invalid. |
| 405 |
Method Not Allowed |
Only POST requests are allowed for this endpoint. |
| 502 |
AI Error |
The AI service could not be reached. |