Skip to main content

Agents

The agents API manages the workspace's provider connections — the BYO model keys (Anthropic, OpenAI, OpenRouter) and compute accounts (Daytona) that agents run on. The list also carries the platform's default models as synthetic read-only rows, so the same read powers every model picker. For the model, see Models & providers.

Connection ids are apc_…. Keys are consumed at the connect boundary and held in custody — no response ever returns a key, only a last-4 keyHint.

Endpoints

MethodPathPermissionDescription
GET/v1/organizations/{orgId}/agents/providersorganization.agent.provider.readList connections — workspace rows first, then platform defaults. Optional ?provider= filter
POST/v1/organizations/{orgId}/agents/providersorganization.agent.provider.writeConnect a provider (provider, write-only apiKey, optional name, config)
PATCH/v1/organizations/{orgId}/agents/providers/{id}organization.agent.provider.writeUpdate a connection
DELETE/v1/organizations/{orgId}/agents/providers/{id}organization.agent.provider.writeDisconnect — revokes custody
POST/v1/organizations/{orgId}/agents/providers/{id}/verifyorganization.agent.provider.writeRe-verify the stored key against the provider

List connections

curl "https://api.orunbase.com/v1/organizations/org_1f6a3c9e/agents/providers?provider=anthropic" \
-H "Authorization: Bearer $ORUN_CLOUD_TOKEN"
{
"data": [
{
"id": "apc_8c7d6e5f4a3b20191817161514131211",
"provider": "anthropic",
"name": "default",
"config": {},
"keyHint": "…4f2a",
"status": "verified",
"createdBy": "usr_3c2b1a0f9e8d7c6b5a49382716050403",
"createdAt": "2026-07-01T09:00:00.000Z",
"updatedAt": "2026-07-01T09:00:00.000Z"
},
{
"id": "apc_platform_anthropic_default",
"provider": "anthropic",
"name": "platform-default",
"config": { "defaultModel": "…", "baseUrl": "…" },
"keyHint": "…9b1c",
"status": "verified",
"source": "platform",
"createdBy": "platform",
"createdAt": "1970-01-01T00:00:00.000Z",
"updatedAt": "1970-01-01T00:00:00.000Z"
}
],
"meta": { "requestId": "req_5f2d1c0b9a8e7f6d5c4b3a37", "cursor": null }
}

The source field distinguishes the two populations: "workspace" or "platform" — absent means workspace (rows predating the field). Platform rows are synthetic: always verified, createdBy: "platform", epoch timestamps, ids of the form apc_platform_<provider>_<slug>, names of the form platform-<slug>. They accept no PATCH, DELETE, or verify.

Connect a provider

curl -X POST "https://api.orunbase.com/v1/organizations/org_1f6a3c9e/agents/providers" \
-H "Authorization: Bearer $ORUN_CLOUD_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "provider": "anthropic", "apiKey": "sk-ant-…", "name": "default" }'

provider is one of daytona, anthropic, openai, openrouter; name defaults to default. A duplicate (provider, name) pair is 409 provider_connection_conflict.

Names starting with platform- are reserved for platform default models — the create is rejected with 422 validation_failed carrying the field error names starting with "platform-" are reserved for platform default models, before custody is touched.