TectraTectra
API Reference

REST API Reference

All endpoints are available at https://tectra.vision. API keys are prefixed iai_ and used as Bearer tokens.

Authentication

Pass your API key or JWT token in the Authorization header:

bash
Authorization: Bearer iai_your_api_key
# or
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Endpoints marked Public require no authentication. Endpoints marked API Key / JWT accept both formats.

All Endpoints

GET/healthPublic

Health check. Returns {status: 'ok'}.

POST/api/v1/auth/registerPublic

Create an account. Returns JWT and user info.

POST/api/v1/auth/loginPublic

Login with email and password. Returns JWT.

GET/api/v1/auth/meJWT

Get current authenticated user info.

POST/api/v1/auth/forgot-passwordPublic

Request a password reset email.

POST/api/v1/auth/reset-passwordPublic

Complete password reset with token.

POST/api/v1/keys/api-keysJWT

Create a new API key (iai_ prefix). Shown once.

GET/api/v1/keys/api-keysJWT

List all your API keys.

DELETE/api/v1/keys/api-keys/{id}JWT

Revoke an API key.

POST/api/v1/keys/signing-keysJWT

Generate an Ed25519 signing keypair.

GET/api/v1/keys/signing-keysJWT

List your signing keys.

GET/api/v1/origin-typesPublic

List all available origin type codes.

POST/api/v1/signAPI Key / JWT

Sign an image or video. Core pipeline endpoint.

POST/api/v1/verifyPublic

Verify an image or video. No account needed.

POST/api/v1/registerAPI Key / JWT

SDK: register pre-signed content (hashes only).

GET/api/v1/dashboard/statsJWT

Get your signing stats and recent content records.

POST/api/v1/sign-batchAPI Key

Sign multiple images in one request. Scope: sign.

GET/api/v1/content-recordsAPI Key

List your content records with pagination and filters.

GET/api/v1/content-records/{id}API Key

Get full detail for a content record.

GET/api/v1/content-records/{id}/certificatePublic

Get public provenance certificate.

DELETE/api/v1/content-records/{id}API Key

Revoke a content record.

GET/api/v1/content-records/public/searchPublic

Search the public registry.

POST/api/v1/webhooksAPI Key

Create a webhook.

GET/api/v1/webhooksAPI Key

List your webhooks.

PUT/api/v1/webhooks/{id}API Key

Update a webhook.

DELETE/api/v1/webhooks/{id}API Key

Delete a webhook.

GET/api/v1/widget/embed.jsPublic

Embeddable verification widget JavaScript.

GET/api/v1/widget/badge/{record_id}.svgPublic

Verification badge for a content record.

GET/api/v1/widget/org-badge/{org_name}.svgPublic

Organization verification badge.

Endpoint Details

POST/api/v1/auth/register
bash
curl -X POST https://tectra.vision/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@company.com",
    "password": "secure-password",
    "org_name": "Acme AI Inc.",
    "org_type": "ai_provider"
  }'
json
{
  "access_token": "eyJ...",
  "token_type": "bearer",
  "user": {
    "id": "uuid",
    "email": "you@company.com",
    "org_name": "Acme AI Inc.",
    "org_type": "ai_provider"
  }
}

org_type options: camera_manufacturer ai_provider creative_studio news_org enterprise individual

POST/api/v1/sign

Accepts multipart/form-data. Query param: signing_key_id (required).

bash
curl -X POST "https://tectra.vision/api/v1/sign?signing_key_id=YOUR_KEY_UUID" \
  -H "Authorization: Bearer iai_..." \
  -F "file=@image.png" \
  -F "return_file=false"   # true = return watermarked binary
json
{
  "record_id": "uuid",
  "sha256": "abc123...",
  "perceptual_hash": "def456...",
  "watermark_payload_hex": "ghi789...",
  "signature_hex": "jkl012...",
  "blockchain_status": "pending",
  "certificate": {
    "record_id": "uuid",
    "sha256": "abc123...",
    "signer_public_key": "mno345...",
    "org_name": "Acme AI Inc.",
    "timestamp": "2025-01-15T12:34:56Z"
  }
}
POST/api/v1/verifyPublic - no auth
bash
curl -X POST https://tectra.vision/api/v1/verify \
  -F "file=@suspect-image.png"
json
{
  "authentic": true,
  "confidence": 0.95,
  "origin": {
    "category": "ai",
    "code": "ai_generated_image",
    "label": "AI Generated Image"
  },
  "signer": {
    "org_name": "Acme AI Inc.",
    "org_type": "ai_provider",
    "device_id": "my-model-v3",
    "public_key": "abc123...",
    "key_name": "production-key"
  },
  "blockchain_tx": "0x4a7f...",
  "timestamp": "2025-01-15T12:34:56Z",
  "checks": {
    "watermark": { "passed": true, "details": "Payload matched record uuid" },
    "sha256": { "passed": true, "details": "Exact hash match" },
    "perceptual_hash": { "passed": true, "details": "Distance 0" },
    "blockchain": { "passed": true, "details": "Merkle proof verified on Polygon" }
  }
}
POST/api/v1/keys/signing-keys
bash
curl -X POST https://tectra.vision/api/v1/keys/signing-keys \
  -H "Authorization: Bearer iai_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "production-key",
    "origin_type": "ai_generated_image",
    "device_id": "my-model-v3",
    "device_info": "Model v3 production inference cluster"
  }'
json
{
  "id": "signing-key-uuid",
  "name": "production-key",
  "public_key_hex": "abc123...",
  "origin_type": "ai_generated_image",
  "device_id": "my-model-v3",
  "created_at": "2025-01-15T12:00:00Z"
}
GET/api/v1/dashboard/stats
bash
curl https://tectra.vision/api/v1/dashboard/stats \
  -H "Authorization: Bearer iai_..."
json
{
  "total_signed": 15420,
  "total_verified": 3891,
  "blockchain_anchored": 15380,
  "pending_batch": 40,
  "recent_records": [
    {
      "id": "uuid",
      "sha256": "abc...",
      "created_at": "2025-01-15T12:34:56Z",
      "blockchain_tx": "0x4a7f..."
    }
  ]
}

Rate Limits

POST /sign - 100 requests/minute per API key

POST /verify - 60 requests/minute per IP (public endpoint)

POST /auth/register - 10 requests/minute per IP

Exceeding limits returns HTTP 429. Contact us for higher limits.

Next: Python SDK & TypeScript SDK

Local signing, video support, and directory watcher.