APIs
Connect to any REST API with flexible authentication. Make HTTP requests to external services directly from your conversations.
REST API Sources
API sources allow TorlyAI to make HTTP requests to external services. This is useful for integrating with services that don't have MCP servers but provide REST APIs.
Authentication Types
API Key
Send an API key in a header or query parameter.
Bearer Token
Send a bearer token in the Authorization header.
OAuth 2.0
Use OAuth for services requiring user authorization.
Basic Auth
Username and password authentication.
Adding an API Source
- Click Sources → Add Source
- Select API
- Enter the base URL for the API
- Configure authentication
- Optionally define available endpoints
- Test the connection
Example Configuration
{
"type": "api",
"slug": "my-api",
"name": "My API",
"baseUrl": "https://api.example.com/v1",
"auth": {
"type": "bearer",
"token": "your-api-token"
},
"endpoints": [
{
"method": "GET",
"path": "/users",
"description": "List all users"
},
{
"method": "POST",
"path": "/users",
"description": "Create a new user"
}
]
}Security
API credentials are stored securely in TorlyAI's encrypted credential store at ~/.torlyai/credentials.enc. The encryption uses AES-256-GCM with a machine-specific key.