Authentication

Last updated March 21, 2026

All SynthLink API requests require an API key passed in the request header. This page covers how to obtain a key, how to use it, and what to do when it expires.

Getting a key

API keys are issued automatically. Request one from the main site using the Request API Key button. A secure one-time reveal link is sent to your email right away and typically arrives within a few minutes.

Note:The reveal link expires in 30 minutes and can only be opened once. Store your key immediately after retrieving it.

Using your key

Pass your key in the X-SYNTHLINK-KEY request header. Every endpoint requires this header — requests without it return 401 Unauthorized.

Header
X-SYNTHLINK-KEY: sk_live_your_key_here

Examples

curl
curl -G https://synth-link.com/api/v1/documents \
  -H "X-SYNTHLINK-KEY: sk_live_your_key_here" \
  -d limit=10
fetch
const res = await fetch(
  "https://synth-link.com/api/v1/documents?limit=10",
  {
    headers: {
      "X-SYNTHLINK-KEY": process.env.SYNTHLINK_KEY,
    },
  }
);
python
import httpx, os

resp = httpx.get(
    "https://synth-link.com/api/v1/documents",
    headers={"X-SYNTHLINK-KEY": os.environ["SYNTHLINK_KEY"]},
    params={"limit": 10},
)

Security best practices

Your API key grants full read access to all endpoints. Treat it like a password.

  • Store in environment variables

    Never hardcode the key in source files. Use .env.local in Next.js, os.environ in Python, or your deployment platform's secret management.

  • Never expose to the client

    API requests should always be made server-side. If you expose the key in client-side JavaScript, anyone can read it from the browser.

  • Do not commit to version control

    Add .env* to your .gitignore. If you accidentally commit a key, rotate it immediately.

Warning:If you suspect your key has been compromised, contact support@synth-link.com immediately to have it revoked and a new one issued.

Key expiry and renewal

API keys expire 90 days after they are issued. You will receive an email reminder before expiry. Requests made with an expired key return 401 Unauthorized.

PropertyValue
Expiry90 days from issue date
RenewalRequest a new key from the main site
Expired key response401 Unauthorized

To renew, request a new key from the main site using the Request API Key button. Update your environment variables before the old key expires to avoid any downtime.

Error responses

Authentication errors return a JSON body with an error field describing the problem.

StatusCause
401 UnauthorizedKey is missing, invalid, or expired
429 Too Many RequestsRate limit or daily limit exceeded
401 response body
{
  "error": "Unauthorized"
}
Was this helpful?