REST API Endpoints
Ztrace Documentation
Complete reference for all Ztrace REST API endpoints. All requests require authentication via Bearer token or API key header.
Base URL
All API requests should be made to:
https://api.ztrace.ai/v2Authentication
Include your API key in every request:
Bash
# Option 1: Bearer Token<span class="text-yellow-300">Authorization</span>: <span class="text-yellow-300">Bearer</span> zt_live_xxxxxxxxxxxxx # Option 2: API Key Header<span class="text-yellow-300">X</span>-<span class="text-yellow-300">API</span>-<span class="text-yellow-300">Key</span>: zt_live_xxxxxxxxxxxxxEndpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| POST | /analyze | Analyze single image for geolocation |
| GET | /analyze/:id | Get analysis result by ID |
| POST | /analyze/compare | Compare two images |
| POST | /batch | Create batch processing job |
| GET | /batch/:id | Get batch job status |
| GET | /batch/:id/results | Get batch results (paginated) |
| DELETE | /batch/:id | Cancel batch job |
| POST | /features/extract | Extract features from image |
| POST | /webhooks | Create webhook |
| GET | /webhooks | List webhooks |
| GET | /account | Get account info |
| GET | /usage | Get usage statistics |
Complete API Reference
api-reference.ts
TypeScript
1// Ztrace REST API v2 - Complete Endpoint Reference2 3/**4 * <span class="text-yellow-300">Base</span> <span class="text-yellow-300">URL</span>: https://api.<span class="text-cyan-300">ztrace</span>.<span class="text-cyan-300">ai</span>/v25 * 6 * <span class="text-yellow-300">All</span> requests require authentication via:7 * - <span class="text-yellow-300">Header</span>: <span class="text-yellow-300">Authorization</span>: <span class="text-yellow-300">Bearer</span> <API_KEY>8 * - <span class="text-yellow-300">Or</span>: <span class="text-yellow-300">X</span>-<span class="text-yellow-300">API</span>-<span class="text-yellow-300">Key</span>: <API_KEY>9 */10 11// ============================================12// ANALYSIS ENDPOINTS13// ============================================14 15/**16 * <span class="text-yellow-300">POST</span> /analyze17 * <span class="text-yellow-300">Analyze</span> a single image <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>><span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>for</span></span> geolocation18 */19<span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>interface</span> <span class="text-yellow-300">AnalyzeRequest</span> {20 // Provide ONE of the following:21 image_url?: string; // <span class="text-yellow-300">Public</span> <span class="text-yellow-300">URL</span> to image22 image_base64?: string; // <span class="text-yellow-300">Base64</span> encoded image23 // Or upload as multipart/form-data with 'image' field24 25 options?: {26 model?: <span class="text-emerald-<span class="text-orange-400">400</span>">'geo-v3'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'geo-v3-turbo'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'geo-v3-precision'</span>;27 confidence_threshold?: number; // <span class="text-orange-400">0.<span class="text-cyan-300">0</span></span> - <span class="text-orange-400">1.<span class="text-cyan-300">0</span></span>28 include_features?: boolean;29 include_landmarks?: boolean;30 include_weather?: boolean;31 include_satellite?: boolean;32 max_results?: number; // <span class="text-yellow-300">For</span> multiple location candidates33 language?: string; // <span class="text-yellow-300">ISO</span> <span class="text-orange-400">639</span>-<span class="text-orange-400">1</span> code34 };35}36 37/**38 * <span class="text-yellow-300">GET</span> /analyze/:id39 * <span class="text-yellow-300">Get</span> analysis result by <span class="text-yellow-300">ID</span>40 */41 42/**43 * <span class="text-yellow-300">POST</span> /analyze/compare44 * <span class="text-yellow-300">Compare</span> two images <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>><span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>for</span></span> location similarity45 */46<span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>interface</span> <span class="text-yellow-300">CompareRequest</span> {47 image1_url: string;48 image2_url: string;49 options?: {50 include_features?: boolean;51 };52}53 54// ============================================55// BATCH PROCESSING56// ============================================57 58/**59 * <span class="text-yellow-300">POST</span> /batch60 * <span class="text-yellow-300">Create</span> a <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>new</span> batch processing job61 */62<span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>interface</span> <span class="text-yellow-300">CreateBatchRequest</span> {63 images: <span class="text-yellow-300">Array</span><{64 id: string;65 url?: string;66 base64?: string;67 }>;68 options?: {69 model?: string;70 confidence_threshold?: number;71 priority?: <span class="text-emerald-<span class="text-orange-400">400</span>">'low'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'normal'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'high'</span>;72 webhook_url?: string;73 callback_headers?: <span class="text-yellow-300">Record</span><string, string>;74 };75}76 77/**78 * <span class="text-yellow-300">GET</span> /batch/:id79 * <span class="text-yellow-300">Get</span> batch job status80 */81 82/**83 * <span class="text-yellow-300">GET</span> /batch/:id/results84 * <span class="text-yellow-300">Get</span> batch job <span class="text-blue-400">results</span> (paginated)85 * <span class="text-yellow-300">Query</span> params: limit, offset, status86 */87 88/**89 * <span class="text-yellow-300">DELETE</span> /batch/:id90 * <span class="text-yellow-300">Cancel</span> a batch job91 */92 93// ============================================94// FEATURE EXTRACTION95// ============================================96 97/**98 * <span class="text-yellow-300">POST</span> /features/extract99 * <span class="text-yellow-300">Extract</span> specific features <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>><span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>from</span></span> an image100 */101<span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>interface</span> <span class="text-yellow-300">ExtractFeaturesRequest</span> {102 image_url: string;103 feature_types: <span class="text-yellow-300">Array</span><104 <span class="text-emerald-<span class="text-orange-400">400</span>">'text'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'landmarks'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'objects'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'faces'</span> | 105 <span class="text-emerald-<span class="text-orange-400">400</span>">'vehicles'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'architecture'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'vegetation'</span> | <span class="text-emerald-<span class="text-orange-400">400</span>">'climate'</span>106 >;107 options?: {108 language?: string;109 min_confidence?: number;110 };111}112 113// ============================================114// WEBHOOKS115// ============================================116 117/**118 * <span class="text-yellow-300">POST</span> /webhooks119 * <span class="text-yellow-300">Create</span> a <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>new</span> webhook endpoint120 */121 122/**123 * <span class="text-yellow-300">GET</span> /webhooks124 * <span class="text-yellow-300">List</span> all webhooks125 */126 127/**128 * <span class="text-yellow-300">GET</span> /webhooks/:id129 * <span class="text-yellow-300">Get</span> webhook details130 */131 132/**133 * <span class="text-yellow-300">PATCH</span> /webhooks/:id134 * <span class="text-yellow-300">Update</span> webhook configuration135 */136 137/**138 * <span class="text-yellow-300">DELETE</span> /webhooks/:id139 * <span class="text-yellow-300">Delete</span> a webhook140 */141 142/**143 * <span class="text-yellow-300">POST</span> /webhooks/:id/test144 * <span class="text-yellow-300">Send</span> a test event to webhook145 */146 147// ============================================148// ACCOUNT & USAGE149// ============================================150 151/**152 * <span class="text-yellow-300">GET</span> /account153 * <span class="text-yellow-300">Get</span> account information154 */155 156/**157 * <span class="text-yellow-300">GET</span> /usage158 * <span class="text-yellow-300">Get</span> <span class="text-yellow-300">API</span> usage statistics159 * <span class="text-yellow-300">Query</span> params: start_date, end_date, granularity160 */161 162/**163 * <span class="text-yellow-300">GET</span> /api-keys164 * <span class="text-yellow-300">List</span> <span class="text-yellow-300">API</span> keys165 */166 167/**168 * <span class="text-yellow-300">POST</span> /api-keys169 * <span class="text-yellow-300">Create</span> <span <span class=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>class</span>=<span class="text-emerald-<span class="text-orange-400">400</span>">"text-purple-<span class="text-orange-400">400</span> font-medium"</span>>new</span> <span class="text-yellow-300">API</span> key170 */171 172/**173 * <span class="text-yellow-300">DELETE</span> /api-keys/:id174 * <span class="text-yellow-300">Revoke</span> <span class="text-yellow-300">API</span> key175 */Rate Limits
| Plan | Requests/min | Batch Size | Concurrent Jobs |
|---|---|---|---|
| Free | 10 | 50 | 1 |
| Pro | 100 | 500 | 5 |
| Enterprise | 1000+ | 10,000+ | Unlimited |
Last updated December 2025
Was this helpful?