curl -X PUT "https://app.runtm.com/api/cloud/user/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-your-key-here"
}'
import requests
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/user/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"api_key": "sk-ant-api03-your-key-here"},
)
print(resp.json())
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/user/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ api_key: "sk-ant-api03-your-key-here" }),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}
User Keys
Set User Provider Key
Store or replace a provider API key for the authenticated user.
PUT
/
api
/
user
/
provider-keys
/
{provider}
curl -X PUT "https://app.runtm.com/api/cloud/user/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-your-key-here"
}'
import requests
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/user/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"api_key": "sk-ant-api03-your-key-here"},
)
print(resp.json())
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/user/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ api_key: "sk-ant-api03-your-key-here" }),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}
Stores a provider API key for the authenticated user. If a key already exists for this provider, it is replaced.
Required scope:
integrations:write
string
required
The provider name. One of:
anthropic, openai, cursor, devin, gemini, copilot.string
required
Bearer token.
Authorization: Bearer runtm_xxxstring
required
The provider API key. Minimum 8 characters.
string
The provider name.
boolean
Always
true after a successful set.string
Masked key preview.
string
ISO 8601 timestamp of the update.
curl -X PUT "https://app.runtm.com/api/cloud/user/provider-keys/anthropic" \
-H "Authorization: Bearer runtm_xxx" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-ant-api03-your-key-here"
}'
import requests
provider = "anthropic"
resp = requests.put(
f"https://app.runtm.com/api/cloud/user/provider-keys/{provider}",
headers={
"Authorization": "Bearer runtm_xxx",
"Content-Type": "application/json",
},
json={"api_key": "sk-ant-api03-your-key-here"},
)
print(resp.json())
const provider = "anthropic";
const resp = await fetch(
`https://app.runtm.com/api/cloud/user/provider-keys/${provider}`,
{
method: "PUT",
headers: {
Authorization: "Bearer runtm_xxx",
"Content-Type": "application/json",
},
body: JSON.stringify({ api_key: "sk-ant-api03-your-key-here" }),
}
);
const data = await resp.json();
{
"provider": "anthropic",
"connected": true,
"key_preview": "sk-ant-...here",
"updated_at": "2026-05-09T18:00:00Z"
}