Tarka/Docs/Control API
AvailableControl API

Provision and manage Tarka

The Control API is the versioned automation surface behind customer workspace state in the Tarka Console.

Quickstart

Call the authenticated account surface

Send an approved Tarka account access token as a bearer token. Start with /me, then put the selected org_id in every organization-scoped route. From an AI assistant, connect through MCP instead.

RESThttps://tarka.rest/control/v1
export TARKA_ACCOUNT_TOKEN="..."

# Discover the authenticated identity and organization IDs.
curl "https://tarka.rest/control/v1/me" \
  -H "Authorization: Bearer $TARKA_ACCOUNT_TOKEN"

# Use an organization ID explicitly on workspace requests.
curl "https://tarka.rest/control/v1/orgs/$TARKA_ORG_ID/resources" \
  -H "Authorization: Bearer $TARKA_ACCOUNT_TOKEN"
An inference key is not an account token.

A tk_live_... key calls the Inference API. Ordinary Control API methods reject it. SandboxService methods are the documented exception when the key has the sandboxes scope.

Complete surface

Choose a capability family

Every durable customer-console mutation is represented here. Product runtime traffic uses its separate data-plane API.

API boundaries

Management is separate from runtime traffic

The console and Control API share durable workspace state. Authentication, operator administration, and product data planes retain separate security boundaries.

SurfaceEndpointResponsibility
Control APIhttps://tarka.rest/control/v1Organizations, access requests, credentials, policy, usage, and resource lifecycle.
MCP serverhttps://tarka.rest/mcpThe Control API as tools for AI assistants, with OAuth sign-in.
Inference APIhttps://tarka.rest/v1Language and utility-model runtime requests with tk_live_ keys.
Object Storagehttps://storage.tarka.restS3 object operations with bucket-scoped access and secret keys.
Hosted Githttps://git.tarka.restClone, fetch, and push with SSH keys or personal access tokens.
Account authenticationhttps://tarkahq.com/console/Signup, verification, login, recovery, refresh, and logout.
Operator approvalsInternal console routePrivileged account decisions; intentionally not a customer Control API.
Contract

gRPC-first with generated REST bindings

The protobuf service and its google.api.http annotations are authoritative. REST and native gRPC invoke the same handlers and authorization checks.

REST basehttps://tarka.rest/control/v1

JSON uses protobuf snake_case field names. Unknown fields are rejected.

Native gRPCgrpc.tarka.rest:443

Use tarka.provisioning.v1.ProvisioningService and SandboxService.

Machine contracttarka-control-v1.swagger.json

Open the generated Swagger document →

Timestamps use RFC 3339. Protobuf JSON may encode 64-bit integers as strings. The request body limit is 2 MiB. Sandbox source, stdin, timeout, and manifest limits are narrower and documented on the Sandbox page.

Errors and retries

Treat status and machine codes as the contract

Authentication middleware returns a compact {"error":"code"} body. Dispatched protobuf errors use the standard gRPC-Gateway status shape.

HTTPMeaningClient action
400Invalid field or validation limitCorrect the request; do not retry unchanged.
401Missing or invalid bearer tokenRefresh or replace the account session.
402Insufficient funded credit or a spend limitReview billing and reservations before retrying.
403Account, membership, role, entitlement, scope, or organization deniedResolve access; do not retry unchanged.
404Visible resource does not existCheck the organization and resource ID.
409Name conflict or lifecycle preconditionInspect current resource state.
429Quota, rate, or capacity exhaustedBack off and honor the applicable limit.
503A required control dependency is unavailableRetry idempotent reads and idempotent mutations with backoff.