Generate
curl --request POST \
--url https://api.example.com/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"model": "<string>",
"max_tokens": 123,
"temperature": 123
}
'import requests
url = "https://api.example.com/generate"
payload = {
"prompt": "<string>",
"model": "<string>",
"max_tokens": 123,
"temperature": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>', model: '<string>', max_tokens: 123, temperature: 123})
};
fetch('https://api.example.com/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'model' => '<string>',
'max_tokens' => 123,
'temperature' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"node": "<string>",
"output": "<string>",
"usage": {}
}API
Generate
Run model inference on the ARIS network.
POST
/
generate
Generate
curl --request POST \
--url https://api.example.com/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"model": "<string>",
"max_tokens": 123,
"temperature": 123
}
'import requests
url = "https://api.example.com/generate"
payload = {
"prompt": "<string>",
"model": "<string>",
"max_tokens": 123,
"temperature": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({prompt: '<string>', model: '<string>', max_tokens: 123, temperature: 123})
};
fetch('https://api.example.com/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => '<string>',
'model' => '<string>',
'max_tokens' => 123,
'temperature' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/generate"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/generate")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"<string>\",\n \"model\": \"<string>\",\n \"max_tokens\": 123,\n \"temperature\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"node": "<string>",
"output": "<string>",
"usage": {}
}Send a prompt to an eligible worker node and receive generated output plus usage metadata.
Request body
Input text for inference.
Model identifier (for example
tinyllama).Maximum output tokens. Default is
256.Sampling temperature between
0.0 and 2.0. Default is 0.7.Example request
{
"prompt": "Explain quantum tunneling in one paragraph.",
"model": "tinyllama",
"max_tokens": 256,
"temperature": 0.7
}
Success response
Unique job ID for this generation request.
Worker node that executed the inference.
Generated completion text.
Usage object with token and credits metadata.
Response example
{
"id": "job_abc123",
"node": "node-9006",
"usage": {
"tokens": 142,
"credits_deducted": 1.42
},
"output": "Quantum tunneling occurs when..."
}
Error responses
| Status | Meaning | Retry |
|---|---|---|
400 | Invalid request parameters. | No |
401 | Missing or invalid API key. | No |
402 | Insufficient credits. | No |
429 | Rate limited. | Yes |
503 | No healthy nodes available. | Yes |
Last modified on February 21, 2026
⌘I