API Reference
Authentication

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 prefix

Getting Your API Key

Option 1: Sign Up Flow

  1. Subscribe at glyphnet.io/pricing (opens in a new tab)
  2. Complete payment
  3. Receive API key via email

Option 2: Dashboard

  1. Log in at glyphnet.io/dashboard (opens in a new tab)
  2. Go to API Keys
  3. 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

  1. Use environment variables - Never hardcode keys
  2. Server-side only - Never expose keys in browser code
  3. Rotate regularly - Create new keys periodically
  4. Revoke compromised keys - Act immediately if exposed
  5. Use minimal scopes - Only grant necessary permissions