Getting Structured Outputs
Get structured data from your Inferable runs
When triggering runs in Inferable, you can specify a schema to ensure the output is structured in a way that’s easy to process programmatically.
Defining Output Schema
You can define the expected structure of your run’s output using Zod schemas:
Output Format
When a run completes successfully, the result will be structured according to your schema:
If a run cannot produce a structured result matching your schema, the result
field will be null
and a message explaining why will be provided.
Using with Agents
When working with Agents, you can define a default resultSchema
that will be used for all runs created with that agent. This is particularly useful when you want to standardize output across multiple runs:
Integration Examples
Zapier
When using Inferable with Zapier, structured output allows you to use the results in subsequent steps of your Zap. The output will be automatically converted to a format Zapier can understand.
API Endpoints
When building API endpoints that use Inferable, structured output ensures your API responses are consistent and typed:
Related Pages
Was this page helpful?