TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mauroperez055/infoJobs/llms.txt
Use this file to discover all available pages before exploring further.
GET /ai/summary/:id endpoint generates a concise, human-friendly summary of a job listing using a locally running Ollama language model. The response is streamed back to the client as plain text chunks so that the UI can progressively display content as it is produced — rather than waiting for the full generation to complete. The summary is written in Spanish, is 4–6 sentences long, and covers the role, company, location, and key requirements.
Ollama must be running locally at
http://localhost:11434 for this endpoint to function. The model used is qwen2.5:3b. If Ollama is not running or the model is not available, the endpoint returns a 500 error (provided headers have not yet been sent).Path Parameters
The UUID of the job listing to summarize. The job must already exist in the store.
Response Format
This endpoint does not return JSON. The response is a raw text stream delivered with the following headers:| Header | Value |
|---|---|
Content-Type | text/plain; charset=utf-8 |
Transfer-Encoding | chunked |
Rate Limiting
To prevent abuse of the local AI resource, this endpoint is rate-limited usingexpress-rate-limit with the draft-8 standard headers.
| Setting | Value |
|---|---|
| Window | 60 seconds |
| Max requests per IP | 5 |
| Headers | RateLimit (draft-8 spec) |
429:
Example
Frontend Integration
The React frontend consumes this endpoint via a customuseAISummary hook that manages the fetch lifecycle, accumulates streamed chunks, and exposes loading and error states:
| Value | Type | Description |
|---|---|---|
summary | string | Accumulated Markdown text received so far from the stream |
loading | boolean | true while the stream is in progress |
error | string | null | Error message if the request failed, otherwise null |
generateSummary | function | Call this to initiate the summary request |
Error Responses
Returned when the provided job ID does not match any record in the store. Headers have not yet been sent, so the response is standard JSON.
Returned when Ollama is unavailable or throws an error before any content has been streamed. If content was already streaming when the error occurs, the connection is closed silently via
res.end().