Setting your API key
Set your API key as an environment variable:SUNRA_KEY from the environment automatically, so no further configuration is needed. Each client also accepts credentials explicitly if you prefer to pass the key in code.
Raw HTTP requests
If you call the API directly over HTTP, pass the key in theAuthorization header. The two product APIs use different schemes:
| API | Base URL | Header |
|---|---|---|
| Multimodal (predictions) | api.sunra.ai | Authorization: Key $SUNRA_KEY |
| LLM (completions) | api-llm.sunra.ai | Authorization: Bearer $SUNRA_KEY |