Get an AI SRE conversation
const url = 'https://app.tunnelhq.com/api/v1/ai-sre/conversations/54';const options = {method: 'GET', headers: {'X-Project-Id': 'prj_12', 'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.tunnelhq.com/api/v1/ai-sre/conversations/54 \ --header 'X-API-Key: <X-API-Key>' \ --header 'X-Project-Id: prj_12'One conversation with its questions and answers. Any role in the project can call it.
While running is true, the last answer is still being written: its steps so far are there. Read it
again in a few seconds. An answer’s status is then done, failed, or stopped.
A change AI SRE suggests is in the answer’s changes. While it waits for a person, its status is
proposed and approve_url opens the conversation in the dashboard, where a signed-in person approves it.
Need an API key? See Getting an API key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The conversation’s id, a number such as 54, from Ask AI SRE or List AI SRE conversations.
Example
54Header Parameters
Section titled “Header Parameters”The project, as prj_12 or 12. A workspace key can only reach its own workspace’s projects.
Example
prj_12Responses
Section titled “ Responses ”The conversation.
object
The tunnel or check it’s about, as srv_57, or null.
Whether the last answer is still being written.
The conversation’s page in the dashboard.
ISO 8601, UTC.
Each question and answer, oldest first.
object
A question is always done.
Questions only: what was asked. A pasted link or config shows as dots.
Questions only: the files sent with it.
object
In bytes.
Pictures only.
Pictures only.
PDFs only.
Only when uploaded: something in the text file was hidden.
A VPN config or share link inside stays in TunnelHQ and isn’t sent to the AI provider.
In a conversation: its contents were deleted, after 30 days or by hand.
In a conversation, to a role that can edit monitors, while the contents are kept.
Answers only. null until it’s written, and for one that failed or was stopped.
object
object
object
Up to two tables or charts
object
Steps for a person to follow.
Commands to run on the server. Check them with whoever runs it first.
Whether a better answer needs the TunnelHQ agent on the server.
Answers only: why it failed.
Answers only: what it read, step by step.
object
UTC, as YYYY-MM-DD HH:MM:SS.
Answers only: changes it suggested.
object
proposed while it waits for a person.
Only while proposed: where a signed-in person approves it in the dashboard.
Stopped answers only: whether it counts toward the month.
ISO 8601, UTC.
ISO 8601, UTC.
Example
{ "id": 54, "title": "Why sg-vless-01 is down", "source": "asked", "monitor_id": "srv_57", "running": false, "url": "https://app.tunnelhq.com/ai-sre/c/54", "created_at": "2026-11-10T13:20:11.000Z", "messages": [ { "id": 301, "role": "user", "status": "done", "text": "Why is it down?", "created_at": "2026-11-10T13:20:11.000Z", "finished_at": null }, { "id": 302, "role": "assistant", "status": "done", "answer": { "headline": "The server stopped answering on port 443 at 13:12 UTC.", "body": "Every location fails at the connect step, and the Trojan tunnel on the same server is still up, so the server runs but the VLESS service on it doesn't.", "facts": [ { "label": "Down since", "text": "13:12 UTC, 8 checks in a row" } ], "ruled_out": [ { "cause": "The network", "found": "The Trojan tunnel on the same server passes." } ], "visuals": [], "steps_by_hand": null, "commands": "systemctl restart xray", "needs_agent": false }, "error": null, "steps": [ { "label": "Read the tunnel's last checks", "at": "2026-11-10 13:20:14" } ], "changes": [], "created_at": "2026-11-10T13:20:11.000Z", "finished_at": "2026-11-10T13:21:40.000Z" } ]}Headers
Section titled “Headers”Requests the workspace’s plan allows per minute.
Requests left in the current minute.
Unix time, in seconds, when the current minute ends.
The X-Project-Id header is missing or malformed.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Examples
{ "error": true, "code": 400, "message": "X-Project-Id header is required (e.g. prj_1 or numeric id)"}{ "error": true, "code": 400, "message": "Invalid project ID format (use prj_1 or numeric id)"}The API key is missing, wrong, expired, switched off, or no longer valid.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Examples
{ "error": true, "code": 401, "message": "API key is required. Provide X-API-Key header or Authorization: Bearer <key>"}{ "error": true, "code": 401, "message": "Invalid or expired API key"}{ "error": true, "code": 401, "message": "API key has expired"}{ "error": true, "code": 401, "message": "API key owner account is inactive"}{ "error": true, "code": 401, "message": "This API key's workspace access has been removed"}The key can’t reach this project.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Examples
{ "error": true, "code": 403, "message": "This API key is scoped to a different organization"}{ "error": true, "code": 403, "message": "You do not have access to this project"}The project has no such conversation.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Example
{ "error": true, "code": 404, "message": "No such conversation in this project."}A usage limit was reached, or this IP address made too many requests with a wrong key.
Usage limits are per workspace and plan: per minute (Retry-After: 60), per day
(Retry-After: 3600), and per month (no Retry-After). They use their own body shape.
An IP address may send 10 wrong keys a minute; one more is allowed every 6 seconds. While
that allowance is used up, every request from the address is refused, even one with a
valid key.
object
Seconds to wait. Absent for the monthly limit.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Examples
{ "error": "Rate limit exceeded", "message": "Per-minute limit of 60 requests exceeded", "retry_after": 60}{ "error": "Daily limit exceeded", "message": "Daily limit of 25000 requests exceeded", "retry_after": 3600}{ "error": "Monthly limit exceeded", "message": "Monthly limit of 250000 requests exceeded"}{ "error": true, "code": 429, "message": "Too many failed API key attempts from this address. Wait a few seconds and try again.", "retry_after": 6}Headers
Section titled “Headers”Seconds to wait. 60 for the per-minute limit, 3600 for the daily limit, 6 after wrong keys. Absent for the monthly limit.
Something failed on TunnelHQ’s side.
object
The HTTP status, repeated.
What went wrong.
More detail, on some errors.
Seconds to wait, on the 429 for wrong keys.
Example
{ "error": true, "code": 500, "message": "Internal server error"}