Skip to main content
PUT
/
api
/
agent-runtimes
/
{runtime}
/
credentials
Save credentials for a built-in runtime
curl --request PUT \
  --url https://litellm-rust.onrender.com/api/agent-runtimes/{runtime}/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_key": "sk-...",
  "api_base": "https://api.cursor.com"
}
'
import requests

url = "https://litellm-rust.onrender.com/api/agent-runtimes/{runtime}/credentials"

payload = {
"api_key": "sk-...",
"api_base": "https://api.cursor.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({api_key: 'sk-...', api_base: 'https://api.cursor.com'})
};

fetch('https://litellm-rust.onrender.com/api/agent-runtimes/{runtime}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "runtimes": [
    {
      "name": "Cursor",
      "default_api_base": "https://api.cursor.com",
      "credential_provider_id": "cursor",
      "credential_provider_name": "Cursor",
      "tools": [
        {}
      ],
      "connected": true,
      "api_base": "<string>",
      "masked_api_key": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Your LITELLM_MASTER_KEY. Default for local Docker Compose: sk-local

Path Parameters

runtime
enum<string>
required
Available options:
claude_managed_agents,
cursor,
gemini_antigravity,
elastic_agent_builder

Body

application/json
api_key
string
required
Example:

"sk-..."

api_base
string

Optional. Defaults to the runtime's built-in base URL when omitted.

Example:

"https://api.cursor.com"

Response

Credential saved

runtimes
object[]