Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
265 lines (265 loc) · 6.56 KB
/
Copy pathopenapi.yaml
File metadata and controls
265 lines (265 loc) · 6.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
openapi: 3.1.1
info:
title: LayerForge API
version: 1.0.0
summary: Contract-first API for turning still images into canonical DALG scene assets.
description: |
This repository is still a Python/CLI research engine, but the product direction
is API-first. This OpenAPI document defines the intended public contract around
the canonical DALG artifact so the control plane, editor, and SDK work can stay
aligned with the current engine.
servers:
- url: https://api.layerforge.dev
description: Shared SaaS API
- url: https://layerforge.customer.example
description: Isolated enterprise deployment
tags:
- name: Jobs
- name: Exports
- name: Assets
paths:
/v1/jobs:
post:
tags: [Jobs]
summary: Submit a decomposition job
operationId: createJob
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateJobRequest'
responses:
'202':
description: Job accepted
content:
application/json:
schema:
$ref: '#/components/schemas/JobResponse'
/v1/jobs/{jobId}:
get:
tags: [Jobs]
summary: Get job status and selected outputs
operationId: getJob
parameters:
- $ref: '#/components/parameters/JobId'
responses:
'200':
description: Current job state
content:
application/json:
schema:
$ref: '#/components/schemas/JobResponse'
/v1/jobs/{jobId}/dalg:
get:
tags: [Jobs]
summary: Fetch the canonical DALG manifest for a completed job
operationId: getJobDalg
parameters:
- $ref: '#/components/parameters/JobId'
responses:
'200':
description: Canonical scene graph
content:
application/json:
schema:
$ref: '#/components/schemas/DalgManifest'
/v1/jobs/{jobId}/exports/design-manifest:
post:
tags: [Exports]
summary: Create or refresh the design-manifest export for a job
operationId: createDesignManifestExport
parameters:
- $ref: '#/components/parameters/JobId'
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
format:
type: string
enum: [json]
default: json
responses:
'200':
description: Export created
content:
application/json:
schema:
$ref: '#/components/schemas/ExportResponse'
/v1/assets/{assetId}:
get:
tags: [Assets]
summary: Fetch immutable uploaded asset metadata
operationId: getAsset
parameters:
- name: assetId
in: path
required: true
schema:
type: string
responses:
'200':
description: Asset metadata
content:
application/json:
schema:
$ref: '#/components/schemas/AssetResponse'
components:
parameters:
JobId:
name: jobId
in: path
required: true
schema:
type: string
schemas:
CreateJobRequest:
type: object
required:
- input
properties:
input:
type: object
description: Signed-upload reference or asset identifier.
properties:
assetId:
type: string
sourceUrl:
type: string
format: uri
recipe:
type: object
description: High-level knobs mapped to a LayerForge recipe version.
properties:
mode:
type: string
enum: [native, peeling, extract, transparent, qwen_raw, qwen_graph_preserve, qwen_graph_reorder]
prompts:
type: array
items:
type: string
segmenter:
type: string
depthMethod:
type: string
orderingMethod:
type: string
callbacks:
type: object
properties:
webhookUrl:
type: string
format: uri
JobResponse:
type: object
required:
- id
- status
- mode
properties:
id:
type: string
status:
type: string
enum: [queued, running, succeeded, failed]
mode:
type: string
assetId:
type: string
dalgPath:
type: string
metricsPath:
type: string
previewPaths:
type: object
additionalProperties:
type: string
warnings:
type: array
items:
type: string
ExportResponse:
type: object
required:
- jobId
- format
- path
properties:
jobId:
type: string
format:
type: string
path:
type: string
AssetResponse:
type: object
required:
- id
- checksum
properties:
id:
type: string
checksum:
type: string
filename:
type: string
contentType:
type: string
width:
type: integer
height:
type: integer
DalgManifest:
type: object
description: Canonical Depth-Aware Amodal Layer Graph manifest.
required:
- kind
- schema_version
- dalg_version
- alpha_mode
- color_space
- model_manifest
- asset
- recipe
- graph
- metrics
- exports
properties:
kind:
type: string
const: layerforge.dalg
schema_version:
type: string
dalg_version:
type: string
enum:
- "1.0"
- "1.1"
alpha_mode:
type: string
enum:
- straight
- premultiplied
color_space:
type: string
model_manifest:
type: object
additionalProperties: true
asset:
type: object
additionalProperties: true
recipe:
type: object
additionalProperties: true
graph:
type: object
additionalProperties: true
metrics:
type: object
additionalProperties: true
exports:
type: object
additionalProperties: true