Skip to content

Support extraBody request in payloads#206

Open
triozer wants to merge 1 commit intofal-ai:mainfrom
triozer:feature/client-extra-body
Open

Support extraBody request in payloads#206
triozer wants to merge 1 commit intofal-ai:mainfrom
triozer:feature/client-extra-body

Conversation

@triozer
Copy link
Copy Markdown

@triozer triozer commented Apr 3, 2026

Context

This makes the client more flexible when callers need to send auxiliary JSON-safe data alongside the normal FAL input payload.

This is especially useful when using fal behind a proxy. The proxy already receives and forwards the JSON request body, so a dedicated extraBody field gives applications a clean place for proxy-specific metadata or control values without overloading the model’s top-level input schema. That makes it easier for proxy code to inspect, transform, strip, or act on those fields before forwarding the request upstream.

What Changed

  • add extraBody to client request options for run, queue submit/subscribe, and streaming
  • serialize non-GET payloads as { ...input, extraBody } while keeping extraBody JSON-safe and untransformed
  • add focused tests for request body shaping, streaming parity, and invalid GET / non-object input cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant