The FIG API (Form Integrated Generation) is a powerful service that transforms simple form submissions into intelligent, personalized responses. By combining your organization's knowledge base with advanced AI, it creates contextually relevant replies that maintain your voice and expertise.
Features at a Glance:
curl -X POST https://incrediforms-api-642822023513.us-central1.run.app/ai/generate \
-H "Content-Type: application/json" \
-H "x-incredi-api-key: YOUR_API_KEY" \
-d '{
"submission": {"field1": "value1"},
"fig_collection_id": "collection_id",
"stream": false
}'
POST https://incrediforms-api-642822023513.us-central1.run.app/ai/generate
The following headers are required for all API requests:
The request body should be a JSON object with the following fields:
FIG collections are created in the IncrediForms dashboard, containing files and prompts.
{
"submission": {
"field1": "value1",
"field2": "value2"
},
"fig_collection_id": "collection_id",
"stream": false
}
application/json
{
"generative_response": "AI-generated markdown content based on the input",
"model": "deepseek-chat",
"usage_metadata": {
"input_tokens": 668,
"output_tokens": 847,
"total_tokens": 1515,
"input_token_details": {
"cache_read": 640
}
}
}
application/json
{
"status": "error",
"message": "Error message details"
}
I analyze form submissions and provide personalized responses based on the given instructions. All responses will be formatted in Markdown, with:
1. Read and process the submitted form data
2. Follow the provided response instructions carefully, which include:
- The role I should adopt (e.g., "Act as an expert in...")
- The specific goal of the response (e.g., "recommend the most suitable plan")
- Any additional context or information provided
- The desired tone and style of communication
3. Generate a response that:
- Uses proper Markdown formatting including:
* Headers with a single space after #
* Code blocks with triple backticks when needed
* Proper line spacing before and after lists
* Consistent emphasis using asterisks
- Directly addresses the form submitter
- References their specific submission details
- Maintains the specified expertise and perspective
- Provides relevant, actionable recommendations