feat: publish readable model ids and media task adapters

This commit is contained in:
wlx committed 2026-09-29 01:29:07 +08:00
1 parent ba98b47618
commit 94eaee7b95
16 files changed
+654 -41

No files matched your search

@@ -21,14 +21,17 @@ public class TaskController {
this.tasks = tasks;
}
@PostMapping("/3d/tasks")
@PostMapping("/{type:3d|image|audio}/tasks")
public ResponseEntity<Map<String, Object>> create3d(
@org.springframework.web.bind.annotation.PathVariable(required = false) String type,
@RequestHeader(value = "Authorization", required = false) String authorization,
@RequestBody Map<String, Object> input
) {
return ResponseEntity.status(HttpStatus.ACCEPTED).body(Map.of("task", tasks.create(authorization, "3d", input)));
String taskType = type == null ? String.valueOf(input == null ? "3d" : input.getOrDefault("taskType", "3d")) : type;
return ResponseEntity.status(HttpStatus.ACCEPTED).body(Map.of("task", tasks.create(authorization, taskType, input)));
}
@PostMapping("/video/tasks")
public ResponseEntity<Map<String, Object>> createVideo(
@RequestHeader(value = "Authorization", required = false) String authorization,