Start a Run
Submit a plain-English question and the agent will plan, search, and produce a markdown intelligence report.
POST /api/v1/runs
Parameters
| question | Required — the plain-English question (e.g., "What is being said about Tesla battery recalls this week?") |
| available_credits | Optional — reasoning effort for the run. 1 = low, 2 = medium, 3 = high, 4 = max (default). Higher values let the agent perform more searches and produce deeper analysis at higher cost. |
| mode | Optional — investigation mode. Default: trend_briefing. Allowed: trend_briefing, monitoring, competitive_intel. |
| time_window | Optional — time window to search. Default: 7d. Examples: 24h, 7d, 30d. |
| platforms | Optional — array of platforms to search. Allowed values: twitter, reddit, bluesky, youtube, threads, facebook. |
| max_post | Optional — maximum posts per platform. Default: 100. |
| parent_run_id | Optional — UUID of a parent run (for follow-ups). |
| metadata | Optional — arbitrary JSON object stored on the run for your own tracking. |
Request Example
curl -X POST "https://agent.rolli.ai/api/v1/runs" \
-H "X-ROLLI-TOKEN: your_token" \
-H "X-ROLLI-USER-ID: your_user_id" \
-H "Content-Type: application/json" \
-d '{
"question": "What is being said about Tesla battery recalls this week?",
"mode": "trend_briefing",
"time_window": "7d",
"platforms": [
"twitter",
"reddit"
],
"max_post": 100
}'
fetch("https://agent.rolli.ai/api/v1/runs", {
method: "POST",
headers: {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
},
body: JSON.stringify({"question":"What is being said about Tesla battery recalls this week?","mode":"trend_briefing","time_window":"7d","platforms":["twitter","reddit"],"max_post":100})
})
.then(res => res.json())
.then(console.log);
require "net/http"
require "uri"
require "json"
uri = URI("https://agent.rolli.ai/api/v1/runs")
req = Net::HTTP::Post.new(uri)
req["X-ROLLI-TOKEN"] = "your_token"
req["X-ROLLI-USER-ID"] = "your_user_id"
req["Content-Type"] = "application/json"
req.body = {"question":"What is being said about Tesla battery recalls this week?","mode":"trend_briefing","time_window":"7d","platforms":["twitter","reddit"],"max_post":100}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
puts res.body
import requests
import json
url = "https://agent.rolli.ai/api/v1/runs"
headers = {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
}
payload = {
"question": "What is being said about Tesla battery recalls this week?",
"mode": "trend_briefing",
"time_window": "7d",
"platforms": [
"twitter",
"reddit"
],
"max_post": 100
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
Response Example
HTTP 202 Accepted. The run is queued — poll GET /api/v1/runs/{id} for progress and results.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending"
}
Status transitions: pending → running → completed (or failed / waiting).