Tarka/Docs/Control API/Authentication
AvailableControl API · Authentication

Authentication and authorization

A valid bearer proves identity; account approval, organization membership, role, product entitlement, and key scope decide what that identity may do.

Account token

Use the signed-in Tarka account session

The ordinary Control API credential is the short-lived access token issued by Tarka account authentication. The console uses this same token. Refresh it through the account session before it expires.

RESTAuthorization header
curl "https://tarka.rest/control/v1/me" \
  -H "Authorization: Bearer $TARKA_ACCOUNT_TOKEN"
gRPCmetadata
grpcurl \
  -H "authorization: Bearer $TARKA_ACCOUNT_TOKEN" \
  grpc.tarka.rest:443 \
  tarka.provisioning.v1.ProvisioningService/GetCurrentUser
Working outside the browser?

The console keeps your session in HTTP-only cookies, so its token cannot be copied out, and there is no command-line sign-in. To work from an AI assistant, connect it through MCP: it signs in with your account and calls the Control API's methods as tools. For inference, utility models, and Code Sandboxes, use a tk_live_ key with the matching scope.

Keep account tokens server-side.

Do not put a Tarka account token in a public browser bundle, repository, image, log, or shared shell history. It carries the account's current organization roles.

Credential boundary

Use each credential only on its intended plane

CredentialAccepted byNot accepted by
Account access tokenEvery Control API REST and gRPC methodInference runtime requests
MCP connectionhttps://tarka.rest/mcp, within its read or write accessControl API REST and gRPC, and inference
tk_live_ + inferenceLanguage-model runtime routesOrdinary Control API methods
tk_live_ + utilitiesOCR, transcription, translation, and speech routesOrdinary Control API methods
tk_live_ + sandboxesSandboxService methods for the key's organizationOther Control API methods and other organizations
S3 access key pairstorage.tarka.rest for one bucketTarka REST, gRPC, and Hosted Git
SSH key or Git PATgit.tarka.restControl, inference, and object-storage APIs
Authorization

Five checks protect workspace state

A valid token alone does not authorize a resource operation.

  1. 01
    Platform access

    The account's platform entitlement must be approved rather than pending, suspended, or revoked.

  2. 02
    Organization state

    The requested organization and membership must both be active.

  3. 03
    Organization role

    The role must permit the requested read or mutation.

  4. 04
    Product entitlement

    Each product requires an approved product entitlement.

  5. 05
    API-key scope

    When SandboxService is called with tk_live_, the key must be active, organization-bound, and include sandboxes.

Roles

Organization role matrix

Product entitlements can still deny an operation that the role would otherwise permit.

AbilityOwnerAdminOperatorMemberViewer
Read organization, members, models, usage, resources, and product stateYesYesYesYesYes
Submit a product-access requestYesYesYesYesYes
Rename organization or replace quota policyYesYesNoNoNo
Create or revoke API keysYesYesYesNoNo
Mutate compute, sandbox, storage, or repository resourcesYesYesYesNoNo
Not Control API methods

Account lifecycle remains with Tarka Auth

Signup, email verification, login, password recovery, session refresh, and logout are identity-provider flows at the Tarka account surface. Operator approval is an internal administration workflow. Neither is represented as a customer provisioning RPC.

Start with GET /me.

A 200 response confirms token validity and platform approval while returning usable organization IDs. A 403 such as account_pending is an access decision, not a token-refresh signal.