Mager API
Generation

Daftar model

GET/api/v1/models

Mengembalikan seluruh slug model yang bisa Anda kirim sebagai field model di POST /api/v1/generation-tasks. Baca input_schema untuk mengetahui key input, nilai enum, dan field wajib yang didukung sebuah model.

Autentikasi

MagerApiKey
x-mager-api-key<token>

API key Mager

Di: header

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/models" \  -H "x-mager-api-key: YOUR_API_KEY"
{  "status": 200,  "message": "Success",  "data": [    {      "model": "image-generator",      "title": "Image Generator",      "subtitle": "Generate commercial images from prompt or presets",      "capability": "IMAGE_GENERATION",      "default_output_count": 1,      "input_schema": {        "type": "object",        "properties": {          "prompt": {            "type": "string",            "description": "Prompt utama untuk generasi."          },          "aspectRatio": {            "type": "string",            "enum": [              "1:1",              "9:16",              "16:9"            ]          },          "style": {            "type": "string"          }        },        "required": [          "prompt"        ]      },      "model_tiers": [        "lite",        "max"      ]    }  ]}