Skip to content

Commit e2fb64f

Browse files
committed
docs: fix fal doc accuracy — array shape, auto-default, clamping, invalid JSON
- has_nsfw_concepts is an array (one per image), not a scalar - Document pollsBeforeCompleted auto-default behavior - Document clamping when pollsBeforeCompleted < pollsBeforeInProgress - Add invalid JSON error row to Queue Lifecycle table
1 parent 17e0f66 commit e2fb64f

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

docs/fal-ai/index.html

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ <h2>Typed Helpers: <code>onFalImage</code> / <code>onFalVideo</code></h2>
139139
<p>
140140
Defaults filled in for image: <code>width: 1024</code>, <code>height: 1024</code>,
141141
<code>content_type</code> inferred from URL extension,
142-
<code>has_nsfw_concepts: false</code>, <code>timings.inference: 0</code>,
142+
<code>has_nsfw_concepts: [false, &hellip;]</code> (one per image), <code>timings.inference: 0</code>,
143143
<code>seed: 0</code>. For video: <code>content_type</code> +
144144
<code>file_name</code> inferred from URL, <code>file_size: 0</code>, <code>seed: 0</code>.
145145
</p>
@@ -223,6 +223,16 @@ <h2>Queue Lifecycle</h2>
223223
<code>{ status: "ALREADY_COMPLETED" }</code> (400) after
224224
</td>
225225
</tr>
226+
<tr>
227+
<td>Submit (bad body)</td>
228+
<td>POST</td>
229+
<td><code>/fal/{owner}/{model}</code></td>
230+
<td>
231+
400 with
232+
<code>{ error: { code: "invalid_json", type: "invalid_request_error", message } }</code>
233+
when the request body is not valid JSON
234+
</td>
235+
</tr>
226236
</tbody>
227237
</table>
228238

@@ -250,6 +260,21 @@ <h2>Polling Realism</h2>
250260
<span class="cm">// result → 200 with the matched payload</span></code></pre>
251261
</div>
252262

263+
<div class="info-box">
264+
<p>
265+
When only <code>pollsBeforeInProgress</code> is set,
266+
<code>pollsBeforeCompleted</code> defaults to
267+
<code>pollsBeforeInProgress + 1</code> so the job always spends at least one poll
268+
in <code>IN_PROGRESS</code>. Set both explicitly for full control.
269+
</p>
270+
</div>
271+
272+
<p>
273+
If <code>pollsBeforeCompleted</code> is set lower than
274+
<code>pollsBeforeInProgress</code>, it is clamped up so
275+
<code>IN_PROGRESS</code> is never skipped.
276+
</p>
277+
253278
<p>
254279
<code>logs</code> always contains at least one entry (job enqueued); a transition entry is
255280
appended for each state change. Cancelling a job before completion sets status to

0 commit comments

Comments
 (0)