Stemfard authenticates requests using API keys. Every request to a mathematics endpoint must include your API key in theDocumentation Index
Fetch the complete documentation index at: https://docsa.stemfard.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header as a Bearer token. Requests without a valid key are rejected with a 401 Unauthorized response. This page explains how to get your key, how to pass it, and how to keep it secure.
Get your API key
Your API key is generated when you create a Stemfard account. You can find it in your dashboard at any time.Sign in to your Stemfard dashboard
Go to your Stemfard account dashboard and navigate to the API Keys section.
Copy your API key
Copy your key and store it somewhere secure, such as a password manager or secrets vault. Treat it like a password — it grants full access to your account’s API usage.
Pass your API key in requests
Include your API key in theAuthorization header of every request using the Bearer scheme:
Authentication errors
If your request fails authentication, the API returns a401 Unauthorized response.
| Scenario | Status code | Likely cause |
|---|---|---|
Missing Authorization header | 401 | The header was not included in the request |
| Malformed header | 401 | The header value does not follow the Bearer <key> format |
| Invalid or revoked key | 401 | The key does not exist or has been regenerated |
401 and your key looks correct, check that there are no extra spaces or newline characters in the key value, and confirm the header name is exactly Authorization.
The
GET / and GET /health endpoints are public and do not require authentication. All /api/v1/ endpoints require a valid API key.Security best practices
Following these practices keeps your key and your users’ data safe.- Use environment variables — Read your key from
process.env.STEMFARD_API_KEY(Node.js),os.environ["STEMFARD_API_KEY"](Python), or your platform’s equivalent. Never hardcode it. - Proxy requests through your backend — If your frontend needs Stemfard data, have it call your own server, which then calls the Stemfard API. Your key stays server-side.
- Rotate keys periodically — Regenerate your API key from the dashboard if you suspect it has been exposed or if a team member with access leaves.
- Restrict access in CI/CD — Store your key as a secret in your CI/CD platform (GitHub Actions, GitLab CI, etc.) rather than in plain configuration files.