MarktSupport← Zurück zur App

Topaz

Topaz-Modelle werden über eine einheitliche, asynchrone Job-API aufgerufen. Starte einen Task mit POST /api/generate und frage dann GET /api/generate/{taskId} ab, bis er fertig ist. Diese Familie stellt 2 Endpunkte bereit.

Überblick

Jeder Endpunkt teilt sich dieselbe Hülle — nur model und die input-Felder ändern sich. Führe einen beliebigen im Playground des Modell-Markts aus.

Authentifizierung

Erstelle einen API-Schlüssel unter /api-keys und sende ihn als Bearer-Token. Anfragen aus dem Browser bei angemeldeter Sitzung funktionieren auch über das Session-Cookie.

Authorization: Bearer <YOUR_API_KEY>

Task erstellen

POST
POST https://api.lithovas.com/api/generate

Body: { "model": "<slug>", "input": { … } }

Antwort: { "taskId": "<id>", "state": "waiting" }

Ergebnis abfragen

GET
GET https://api.lithovas.com/api/generate/<taskId>

Antwort: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

Asynchron
Ein 200 von „Task erstellen“ bedeutet nur, dass der Task angenommen wurde — nicht, dass er fertig ist. Frage diesen Endpunkt ab, bis state zu success oder fail wird. Fehlgeschlagene Tasks werden nicht berechnet.

Endpunkte

ModellTaskmodel slug
TopazImage Upscaletopaz/image-upscale
TopazVideo Upscaletopaz/video-upscale

Topaz · Image Upscale

POSTImage Upscaletopaz/image-upscale
input-Felder
image_urlstringerforderlich

URL of image to upscale (jpeg/png/webp, max 10MB)

upscale_factorenum<string>erforderlich

Factor to upscale the image by

Beispiel
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "topaz/image-upscale",
  "input": {
    "image_url": "https://example.com/input.jpg",
    "upscale_factor": "2"
  }
}'

Topaz · Video Upscale

POSTVideo Upscaletopaz/video-upscale
input-Felder
video_urlstringerforderlich

URL of the video to upscale (mp4/quicktime/x-matroska, max 50MB)

upscale_factorenum<string>optional

Factor to upscale the video by (2 doubles width and height)

Beispiel
cURL
curl -X POST https://api.lithovas.com/api/generate \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "topaz/video-upscale",
  "input": {
    "video_url": "https://example.com/reference.mp4",
    "upscale_factor": "2"
  }
}'