agents

Run an agent (async; read its status from /v1/agent-runs/{id})

post/v1/agents/{slug}/runs

Request

  • Base URL: https://barchin.net/api
  • URL: https://barchin.net/api/v1/agents/{slug}/runs
  • Auth: HTTP bearer

Path parameters

slugstring required

Query parameters

waitinteger

0 = async. N > 0 = wait up to N seconds for the result.

Request body

inputobject required

ورودی ایجنت؛ شکل آن در input_schema همان ایجنت آمده است.

webhook_urlstring uri nullable

فقط برای برنامه‌های متصل (OAuth): آدرس https روی یکی از دامنه‌های ثبت‌شده‌ی برنامه؛ پایان اجرا (موفق یا ناموفق) با امضای HMAC به آن POST می‌شود.

Response

Successful Response

idstring uuid required
agent_slugstring required
statusstring required
inputobject required
credits_heldinteger required
credits_chargedinteger nullable required
refunded_creditsinteger required
children_creditsinteger required
modelstring nullable required
tokens_ininteger nullable required
tokens_outinteger nullable required
cost_breakdownobject nullable
error_codestring nullable required
error_messagestring nullable required
created_atstring date-time required
started_atstring date-time nullable required
finished_atstring date-time nullable required
outputobject nullable required
webhook_urlstring nullable
webhook_statusstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.