Run Agent
POST
/api/public/ai-chat/agents/{agentId}/runs
Starts an asynchronous agent run. Returns immediately with status: processing and a runId that
identifies the run. Poll GET /api/public/ai-chat/agent-runs/{runId}/status until the run is
done or failed.
Run Agent
const url = 'https://backend.podscribe.ai/api/public/ai-chat/agents/1/runs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}import requests
url = "https://backend.podscribe.ai/api/public/ai-chat/agents/1/runs"
payload = { "params": { "additionalProperty": "example" } }headers = { "Authorization": "Bearer <token>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())curl --request POST \ --url https://backend.podscribe.ai/api/public/ai-chat/agents/1/runs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": { "additionalProperty": "example" } }'Path Parameters
Section titled “Path Parameters”agentId
required
integer
ID of an existing AI Chat agent. Copy it from the agent details page in the app.
Request Body
Section titled “Request Body”Media typeapplication/json
params
Key-value map of template parameters substituted into the agent prompt
(for example { "advertiser": "Example Advertiser" } for {{advertiser}}).
Record<string, string>
Examplegenerated
{ "params": { "additionalProperty": "example" }}Response Body
Section titled “Response Body”Agent run accepted
Media typeapplication/json
runId
required
Run identifier; use with the agent run status endpoint.
integer
status
required
State of the run when it is accepted.
Response example
{ "status": "processing"}