Quickstart — Your First Verification in 5 Minutes
This guide will walk you through generating and verifying your first Optropic code. By the end, you'll understand the core API workflow.
Prerequisites
- An Optropic account (sign up at studio.optropic.com)
- An API key (create one in Settings → API Keys)
1. Get Your API Key
- Log in to Optropic Studio
- Navigate to Settings → API Keys
- Click Create API Key
- Copy the key — it starts with
optr_live_oroptr_test_
Store Your Key Securely
Your API key is shown only once. Store it in a secure location like a password manager or environment variable.
2. Generate an Authenticated Code
Use the /code/generate endpoint to create a cryptographically signed GS1 Digital Link.
cURL
curl -X POST https://api.optropic.com/api/v1/code/generate \
-H "x-api-key: optr_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"gtin": "04260799580008",
"serialNumber": "DEMO-001",
"batchNumber": "BATCH-2026"
}'
JavaScript (fetch)
const response = await fetch('https://api.optropic.com/api/v1/code/generate', {
method: 'POST',
headers: {
'x-api-key': 'optr_live_YOUR_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
gtin: '04260799580008',
serialNumber: 'DEMO-001',
batchNumber: 'BATCH-2026',
}),
});
const data = await response.json();
console.log(data.url); // The GS1 Digital Link URL
Python
import requests
response = requests.post(
'https://api.optropic.com/api/v1/code/generate',
headers={
'x-api-key': 'optr_live_YOUR_KEY',
'Content-Type': 'application/json',
},
json={
'gtin': '04260799580008',
'serialNumber': 'DEMO-001',
'batchNumber': 'BATCH-2026',
}
)
data = response.json()
print(data['url']) # The GS1 Digital Link URL
Response
{
"url": "https://id.optropic.com/01/04260799580008/21/DEMO-001/10/BATCH-2026?sig=abc123...",
"gtin": "04260799580008",
"serial": "DEMO-001",
"batch": "BATCH-2026",
"signature": "abc123...",
"keyId": "key-001"
}
3. Verify the Code
Take the URL from step 2 and verify it using the /code/verify endpoint.
curl -X POST https://api.optropic.com/api/v1/code/verify \
-H "x-api-key: optr_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://id.optropic.com/01/04260799580008/21/DEMO-001/10/BATCH-2026?sig=abc123..."
}'
Response
{
"verdict": "AUTHENTIC",
"confidence": 0.95,
"gtin": "04260799580008",
"serial": "DEMO-001",
"batch": "BATCH-2026",
"checks": {
"signature": {
"passed": true,
"keyId": "key-001"
},
"format": {
"passed": true,
"standard": "GS1_DIGITAL_LINK"
}
},
"scanNumber": 1,
"firstSeen": "2026-02-18T10:30:00Z"
}
4. Understanding the Result
| Field | Description |
|---|---|
verdict | AUTHENTIC, COUNTERFEIT, or SUSPICIOUS |
confidence | 0.0 to 1.0 — how confident the system is |
checks.signature.passed | Whether the Ed25519 signature is valid |
scanNumber | How many times this code has been scanned |
What's Next?
- First Verification Guide — Detailed walkthrough with error handling
- API Reference — Complete endpoint documentation
- Auction Integration — Build auction house integrations
Rate Limits
| Tier | Generate | Verify |
|---|---|---|
| Free | 100/day | 1,000/day |
| Starter | 1,000/day | 10,000/day |
| Enterprise | Unlimited | Unlimited |
See Rate Limits for details.