kosa8 AI
7 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
Ask kosa8: answers from the docs and your live status, with links and proposed actions#
/v1/askscope sandboxes:readkosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache. Send Accept: text/event-stream (or stream: true) for server-sent events: meta, delta {text}, then done (the JSON below) or error. Capped per member per hour (429 ask_rate_limit with retry_after_s); 503 ai_off when switched off.
JSON bodyquestionrequiredstringpagestring | nullrepostring | nullhistoryarray of objectstreambooleancurl -s -X POST https://api.kosa8.com/v1/ask \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Why it failed: one line on why, one suggested fix, and the failure class#
/v1/ai/explainscope sandboxes:readkosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache. When the model is capped or off, kosa8's rules answer (source: rules).
JSON bodykindrequired"bot_run" | "pipeline_run" | "agent_task" | "gh_trigger"idrequiredstringcurl -s -X POST https://api.kosa8.com/v1/ai/explain \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
One-click agent tasks: Fix a failing test, Explain this error, Summarize this repo, Write a README#
/v1/agent/templatesscope sandboxes:readkosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache.
Responsescurl -s -X GET https://api.kosa8.com/v1/agent/templates \ -H "Authorization: Bearer $KOSA8_API_KEY"
Recent kosa8 AI agent tasks#
/v1/agent/tasksscope sandboxes:readkosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache.
Responsescurl -s -X GET https://api.kosa8.com/v1/agent/tasks \ -H "Authorization: Bearer $KOSA8_API_KEY"
Start a kosa8 AI agent task on a repo or a sandbox; changes come back as a draft pull request#
/v1/agent/tasksscope sandboxes:writekosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache. Send repo (owner/name through your GitHub connection) or sandbox_id. The agent runs in a sandbox; its short-lived kosa8 AI token is held by the egress broker, never in the sandbox. Draft pull requests only. 10 tasks an hour and 3 at once per organization (429 agent_rate_limit). Poll GET /v1/agent/tasks/{id}.
JSON bodytaskstringtemplatestring | nullrepostring | nullrefstring | nullsandbox_idstring | nulldraft_prbooleancurl -s -X POST https://api.kosa8.com/v1/agent/tasks \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
One agent task, with its steps rail, result and cost#
/v1/agent/tasks/{id}scope sandboxes:readkosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache.
Parametersidrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/agent/tasks/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Stop an agent task; its own sandbox is deleted#
/v1/agent/tasks/{id}/cancelscope sandboxes:writekosa8 AI runs on Cloudflare Workers AI through kosa8's AI gateway: no model key, and the text stays within Cloudflare. Its output is data: it never approves, merges, deletes or widens access, and proposed actions are buttons that run the normal flows. Each model call is metered like other gateway use, capped per hour, and identical inputs are answered from a cache.
Parametersidrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/agent/tasks/$SBX/cancel \ -H "Authorization: Bearer $KOSA8_API_KEY"