Authentication
All API requests require authentication using an API key.
Header Authentication
Include your API key in the X-API-Key header:
curl -X POST https://api.glyphnet.io/v1/verify \
-H "X-API-Key: gn_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world"}'API Key Format
gn_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
└──┘└───┘└──────────────────────────────┘
│ │ │
│ │ └── Random identifier (48 chars)
│ └── Environment (live or test)
└── GlyphNet prefixGetting Your API Key
Option 1: Sign Up Flow
- Subscribe at glyphnet.io/pricing (opens in a new tab)
- Complete payment
- Receive API key via email
Option 2: Dashboard
- Log in at glyphnet.io/dashboard (opens in a new tab)
- Go to API Keys
- Click "Create New Key"
Option 3: API (requires existing key)
curl -X POST https://api.glyphnet.io/v1/keys \
-H "X-API-Key: gn_live_existing_key" \
-H "Content-Type: application/json" \
-d '{"name": "My New Key"}'Code Examples
import requests
import os
api_key = os.environ.get("GLYPHNET_API_KEY")
response = requests.post(
"https://api.glyphnet.io/v1/verify",
headers={
"X-API-Key": api_key,
"Content-Type": "application/json"
},
json={"text": "The sun rises in the east."}
)Error Responses
401 Unauthorized
Missing API Key
{
"error": "missing_api_key",
"message": "API key is required. Include it in the X-API-Key header."
}Invalid API Key
{
"error": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked."
}403 Forbidden
{
"error": "insufficient_permissions",
"message": "Your API key does not have permission for this action."
}Security Recommendations
- Use environment variables - Never hardcode keys
- Server-side only - Never expose keys in browser code
- Rotate regularly - Create new keys periodically
- Revoke compromised keys - Act immediately if exposed
- Use minimal scopes - Only grant necessary permissions