Why Define Input Schema?
Automatic Validation
Invalid requests are rejected before hitting the LLM, saving costs
Clear Documentation
Your OpenAPI docs are auto-generated from your schema
Type Safety
Ensure prompts receive data in the expected format
Default Values
Provide sensible defaults for optional fields
Adding Input Fields
Navigate to your endpoint’s Input Schema tab and click Add Field.Field Configuration
| Property | Required | Description |
|---|---|---|
| Name | Yes | Field identifier used in templates ({{ inputs.name }}) |
| Type | Yes | Data type (see types below) |
| Required | No | Whether the field must be provided |
| Default | No | Value to use if field is not provided |
| Description | No | Help text shown in docs and test forms |
Field Types
- String
- Number
- Integer
- Boolean
- Array
- Object
Text values of any length.Validation options:
minLength— Minimum character countmaxLength— Maximum character countpattern— Regex pattern to matchenum— List of allowed values
Validation Rules
Add validation rules to ensure data quality:String Validation
Enum (Allowed Values)
Number Ranges
Array Limits
Using Inputs in Prompts
Once defined, access input fields in your prompts using Liquid syntax:Use the
| default: filter to provide fallback values for optional fields.JSON Schema Preview
The Input Schema tab shows a live JSON Schema preview:- Request validation
- OpenAPI documentation
- Test form generation
Best Practices
Use descriptive names
Use descriptive names
Field names should be clear and self-documenting.✅
❌
customer_feedback❌
cfAlways add descriptions
Always add descriptions
Descriptions appear in docs and help users understand what to provide.
Set sensible defaults
Set sensible defaults
Optional fields should have reasonable defaults so users don’t need to specify everything.
Validate early
Validate early
Use minLength, maxLength, and patterns to catch bad data before it reaches the LLM.
Keep schemas flat
Keep schemas flat
Avoid deeply nested objects. Flat schemas are easier to understand and template.
Example: Complete Input Schema
Here’s a full example for a content moderation endpoint:| Field | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | Yes | — | The content to moderate |
content_type | string | Yes | — | Type: text, image_url, or html |
categories | array | No | all | Categories to check |
threshold | number | No | 0.7 | Confidence threshold (0-1) |
include_explanation | boolean | No | false | Include reasoning |

