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 https://api.lithovas.com/api/generateBody: { "model": "<slug>", "input": { … } }
Antwort: { "taskId": "<id>", "state": "waiting" }
Ergebnis abfragen
GET https://api.lithovas.com/api/generate/<taskId>Antwort: { "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
state zu success oder fail wird. Fehlgeschlagene Tasks werden nicht berechnet.Endpunkte
Topaz · Image Upscale
topaz/image-upscaleimage_urlstringerforderlichURL of image to upscale (jpeg/png/webp, max 10MB)
upscale_factorenum<string>erforderlichFactor to upscale the image by
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
topaz/video-upscalevideo_urlstringerforderlichURL of the video to upscale (mp4/quicktime/x-matroska, max 50MB)
upscale_factorenum<string>optionalFactor to upscale the video by (2 doubles width and height)
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"
}
}'