Mager API
Generation

Detail template

GET/api/v1/templates/{templateId}

Mengembalikan satu preset template beserta slug model, nilai input bawaan, metadata prompt, dan hasil pratinjaunya.

Autentikasi

MagerApiKey
x-mager-api-key<token>

API key Mager

Di: header

Parameter path

templateId*string

Parameter header

x-mager-api-key*string

API key Mager

Body response

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/templates/string" \  -H "x-mager-api-key: YOUR_API_KEY"
{  "status": 200,  "message": "Success",  "data": {    "template_id": "template_01hxyzready",    "model": "advertisement",    "model_title": "Advertisement Generator",    "capability": "IMAGE_GENERATION",    "description": "Template iklan produk siap pakai.",    "media_url": "https://cdn.example.com/template-preview.png",    "raw_prompt": {      "prompt": "Create a high-converting product advertisement"    },    "input": {      "productName": "Mager Matcha Latte",      "targetAudience": "Gen Z coffee shop customers",      "brandTone": "fresh, playful, premium"    },    "category": {      "id": "category_01hxyz",      "name": "Ads",      "slug": "ads"    },    "preview_results": [      {        "id": "preview_01hxyz",        "type": "image",        "media_url": "https://cdn.example.com/template-result.png",        "content_type": "image/png",        "filename": "template-result.png"      }    ],    "model_tiers": [      "lite",      "max"    ],    "usage_count": 42,    "created_at": "2026-07-03T06:00:00.000Z",    "updated_at": "2026-07-03T06:00:00.000Z"  }}