Learn how to authenticate with the Treeship API
curl -X GET https://api.treeship.dev/v1/agents \ -H "Authorization: Bearer YOUR_API_KEY"
import { Treeship } from '@treeship/sdk'; const treeship = new Treeship({ apiKey: process.env.TREESHIP_API_KEY });
from treeship import Treeship treeship = Treeship( api_key=os.environ.get("TREESHIP_API_KEY") )
# .env file TREESHIP_API_KEY=your_api_key_here
.env
.gitignore
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1640995200
{ "error": { "code": "authentication_required", "message": "Missing or invalid API key" } }