How It Works
Processing Workflow
Docfire AI Engine follows a three-phase flow:
1. Ingest (Reception)
The client sends a POST /api/ingest request with:
- The template to use (e.g.,
translate,pdf_extraction,seo_description) - The products (array of JSON objects) to process
- The template-specific parameters (e.g., source/target language)
An enrichment session is created with a pending status.
2. Process (Processing)
An asynchronous job:
- Builds the appropriate AI prompt based on the template
- Sends the data to the AI model (Google Gemini)
- Parses the response and saves the results to the database
- Updates the session status to
completedorfailed
3. Results
The client can:
- Poll the status —
GET /api/sessions/{id}/statusto check progress - Retrieve results —
GET /api/sessions/{id}/resultsto get the enriched data