Skip to main content

Goal

Make authenticated requests to Trio using a bearer API key.

Base URL

All examples in these docs use: https://trio.machinefi.com/api

Step 1: Get an API Key

Create or copy your key from console.machinefi.com.

Step 2: Send Bearer Auth

Every API request must include:
Authorization: Bearer YOUR_API_KEY
Example:
curl -X POST https://trio.machinefi.com/api/streams/validate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stream_url":"https://www.youtube.com/watch?v=jfKfPfyJRdk"}'

Step 3: Verify Auth Quickly

A successful authenticated call returns normal endpoint JSON. If auth is missing or invalid, you will receive 401 errors. See Debugging Playbook.

Security Practices

  • Keep API keys server-side whenever possible.
  • Do not commit keys to source control.
  • Rotate keys if you suspect exposure.
  • Use separate keys per environment (dev, staging, prod).

Next Steps