AI Keys (BYOK)
Package: agentrouter.aikeys.v1 Service: AiKeysService
Endpoints
Register an AI key
What it does: Encrypts and stores a provider API key under a project. After this call, inference requests routed to the matching provider for this project will use this key. Scope: account-tier so any project member can register their OWN user-scoped key (user_scope=true). Registering a PROJECT-level key (user_scope=false) additionally requires the caller to be the project's owner -- enforced in-handler against project_members.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | no | Defaults to the caller's session customer when empty. |
project_id | no | Defaults to the caller's session project when empty. |
provider | yes | Provider this key authenticates against. |
name | yes | Operator-supplied label for the key, e.g. "openai-prod". |
secret | yes | Plaintext provider key, e.g. sk-.... Sent over TLS only; the server immediately wraps with secrets-svc and discards the plaintext. |
user_scope | no | user_scope registers a per-user key private to the caller that overrides the project key for the caller's inference traffic. When false (default) the key is project-level (shared) and requires the caller to be the project owner. |
Response fields:
| Field | Required | Description |
|---|---|---|
key | no | The newly registered key's metadata record (no plaintext). |
{"signatures":{"go":"func (a *AIKeysClient) Register(ctx context.Context, customerID, projectID string, provider aikeysv1.Provider, name, secret string, userScope bool) (*aikeysv1.RegisterResponse, error)","python":"register(customer_id: str, project_id: str, provider, name: str, secret: str, user_scope: bool) -\u003e RegisterResponse","typescript":"register(customerId: string, projectId: string, provider: AIKeyProvider, name: string, secret: string, userScope: boolean): Promise\u003cRegisterResponse\u003e","cli":"tare api byok add --provider $PROVIDER --name $NAME --secret $SECRET","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"provider\": \"...\",\n \"name\": \"...\",\n \"secret\": \"...\",\n \"user_scope\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID string\n\tProvider string\n\tName string\n\tSecret string\n\tUserScope string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID: \"proj_01H...\",\n\t\tProvider: \"...\",\n\t\tName: \"...\",\n\t\tSecret: \"...\",\n\t\tUserScope: \"...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tprovider := in.Provider\n\tname := in.Name\n\tsecret := in.Secret\n\tuserScope := in.UserScope\n\tresult, err := client.AIKeys().Register(ctx, customerID, projectID, provider, name, secret, userScope)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/aikeys/register\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nprovider = \"...\"\nname = \"...\"\nsecret = \"...\"\nuser_scope = \"...\"\ntry:\n result = client.aikeys.register(customer_id, project_id, provider, name, secret, user_scope)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst provider = \"...\"\nconst name = \"...\"\nconst secret = \"...\"\nconst userScope = \"...\"\ntry {\n const result = await client.aikeys.register(customerId, projectId, provider, name, secret, userScope)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"aikeys\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api byok add --provider $PROVIDER --name $NAME --secret $SECRET","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"provider\": \"...\",\n \"name\": \"...\",\n \"secret\": \"...\",\n \"user_scope\": false\n }'"},"persona":"Authenticated (API key or session token)","httpVerb":"POST","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/aikeys","slug":"register-an-ai-key"}
Get an AI key
What it does: Returns the metadata record for a single BYOK key. Never returns the plaintext. Scope: account-tier. Any project member may read keys in the project (project-level and the caller's own user-scoped keys); membership is enforced in-handler.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | no | Defaults to the caller's session customer when empty. |
project_id | no | Defaults to the caller's session project when empty. |
id | yes | byok_<ulid> identifying the key to fetch. |
Response fields:
| Field | Required | Description |
|---|---|---|
key | no | The requested key's metadata record (no plaintext). |
{"signatures":{"go":"func (a *AIKeysClient) Get(ctx context.Context, customerID, projectID, id string) (*aikeysv1.GetResponse, error)","python":"get(customer_id: str, project_id: str, id: str) -\u003e GetResponse","typescript":"get(customerId: string, projectId: string, id: string): Promise\u003cGetResponse\u003e","cli":"tare api byok get \u003cid\u003e","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID string\n\tId string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID: \"proj_01H...\",\n\t\tId: \"...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tid := in.Id\n\tresult, err := client.AIKeys().Get(ctx, customerID, projectID, id)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/aikeys/get\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nid = \"...\"\ntry:\n result = client.aikeys.get(customer_id, project_id, id)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst id = \"...\"\ntry {\n const result = await client.aikeys.get(customerId, projectId, id)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"aikeys\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api byok get \u003cid\u003e","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/aikeys/{id}","slug":"get-an-ai-key"}
List AI keys
What it does: Lists BYOK keys registered under a project. Returns metadata only -- id, provider, name, display_suffix, creation timestamp, and revocation timestamp if revoked. The result includes the project's shared keys plus the caller's own user-scoped keys (other users' user-scoped keys are not returned). Scope: account-tier; membership is enforced in-handler.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | no | Defaults to the caller's session customer when empty. |
project_id | no | Defaults to the caller's session project when empty. |
Response fields:
| Field | Required | Description |
|---|---|---|
keys | no | All keys registered under the project (metadata only, no plaintext). |
{"signatures":{"go":"func (a *AIKeysClient) List(ctx context.Context, customerID, projectID string) (*aikeysv1.ListResponse, error)","python":"list(customer_id: str, project_id: str) -\u003e ListResponse","typescript":"list(customerId: string, projectId: string): Promise\u003cListResponse\u003e","cli":"tare api byok list","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID: \"proj_01H...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tresult, err := client.AIKeys().List(ctx, customerID, projectID)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/aikeys/list\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\ntry:\n result = client.aikeys.list(customer_id, project_id)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\ntry {\n const result = await client.aikeys.list(customerId, projectId)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"aikeys\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api byok list","curl":"curl \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"GET","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/aikeys","slug":"list-ai-keys"}
Revoke an AI key
What it does: Marks the key revoked; subsequent Fetches return permission_denied. Inflight cached keys on dataplanes invalidate within sub-second via the revocation channel (milestone C). Scope: account-tier so a member can revoke their OWN user-scoped key. Revoking a PROJECT-level key additionally requires project ownership (enforced in-handler); a member may never revoke another user's user-scoped key.
Request fields:
| Field | Required | Description |
|---|---|---|
customer_id | no | Defaults to the caller's session customer when empty. |
project_id | no | Defaults to the caller's session project when empty. |
id | yes | byok_<ulid> identifying the key to revoke. |
{"signatures":{"go":"func (a *AIKeysClient) Revoke(ctx context.Context, customerID, projectID, id string) (*aikeysv1.RevokeResponse, error)","python":"revoke(customer_id: str, project_id: str, id: str) -\u003e RevokeResponse","typescript":"revoke(customerId: string, projectId: string, id: string): Promise\u003cRevokeResponse\u003e","cli":"tare api byok remove \u003cid\u003e","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n)\n\n// input holds the request fields. Replace the placeholder values below.\ntype input struct {\n\tCustomerID string\n\tProjectID string\n\tId string\n}\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\tin := input{\n\t\tCustomerID: \"cust_01H...\",\n\t\tProjectID: \"proj_01H...\",\n\t\tId: \"...\",\n\t}\n\n\tcustomerID := in.CustomerID\n\tprojectID := in.ProjectID\n\tid := in.Id\n\tresult, err := client.AIKeys().Revoke(ctx, customerID, projectID, id)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", result)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/aikeys/revoke\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Replace the placeholder values below.\ncustomer_id = \"cust_01H...\"\nproject_id = \"proj_01H...\"\nid = \"...\"\ntry:\n result = client.aikeys.revoke(customer_id, project_id, id)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Replace the placeholder values below.\nconst customerId = \"cust_01H...\"\nconst projectId = \"proj_01H...\"\nconst id = \"...\"\ntry {\n const result = await client.aikeys.revoke(customerId, projectId, id)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"aikeys\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api byok remove \u003cid\u003e","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/v1/customers/cust_01H.../projects/proj_01H.../aikeys/01H...\" \\\n -H \"Authorization: Bearer ${AGENTROUTER_API_KEY}\""},"persona":"Authenticated (API key or session token)","httpVerb":"DELETE","httpPath":"/v1/customers/{customer_id}/projects/{project_id}/aikeys/{id}","slug":"revoke-an-ai-key"}