ApiframeApiframe Docs
Getting Started

Authentication

How to authenticate with the Apiframe API using API keys.

All API requests must include an API key. You can create and manage API keys from the Apiframe dashboard.

Using your API key

Pass your API key in the X-API-Key header:

curl -H "X-API-Key: afk_your_api_key_here" \
  https://api.apiframe.ai/v2/me
import requests

headers = {"X-API-Key": "afk_your_api_key_here"}
response = requests.get("https://api.apiframe.ai/v2/me", headers=headers)
print(response.json())
const response = await fetch("https://api.apiframe.ai/v2/me", {
  headers: { "X-API-Key": "afk_your_api_key_here" },
});
const data = await response.json();
console.log(data);
req, _ := http.NewRequest("GET", "https://api.apiframe.ai/v2/me", nil)
req.Header.Set("X-API-Key", "afk_your_api_key_here")

resp, err := http.DefaultClient.Do(req)

API key format

API keys always start with the prefix afk_ followed by a random string. For example: afk_abc123def456.

Key security

  • Keep your API key secret — never expose it in client-side code or public repositories
  • Each API key is scoped to a single user within a team
  • You can revoke a key at any time from the dashboard — the key stops working immediately
  • Create separate keys for development and production

Authentication errors

StatusErrorMeaning
401API key is requiredNo X-API-Key header provided
401Invalid API keyThe key does not exist or has been revoked
403API key is inactiveThe key exists but has been deactivated

On this page