Quick Setup
The Vedaya API supports optional authentication. You can use the API without authentication for testing, or add authentication for production use.Complete Setup Example
Authentication Methods
1. No Authentication (Simplest)
Works for testing and development:2. Bearer Token Authentication
For production deployments with authentication enabled:3. OpenAI SDK Compatibility
When using the OpenAI SDK, you can use dummy keys:Working Example Without Auth
OAuth2 Login (Legacy/Optional)
The/login
endpoint exists but is not required:
Fly.io Deployment Authentication Setup
Since the API has no signup endpoint, you need to seed a user via Fly secrets and restart the app. This sets up authentication for protected endpoints.1. Set Secrets for User
Pick a strong password (watch out for!
in zsh; single-quote it).
If your shell yells about!
, either escape it (SuperStrong\!Pass123
) or keep the single quotes as shown.
2. (Optional) Set an API Key
Handy for service-to-service calls. The OpenAPI shows anapi_key_header_value
query param on most endpoints.
3. Restart the App
Apply the secrets by restarting:4. Log In to Get a Token
5. Use the Token on Protected Endpoints
Quick Checks if Authentication Doesn’t Work
-
Print auth status:
-
Watch logs during login:
Best Practices
- For testing: Use no authentication or dummy keys
- For production: Check with your deployment admin if auth is required
- For OpenAI SDK: Always use dummy keys like “sk-dummy”
- For direct HTTP: Omit Authorization header unless you have a real key