AI360’s API is implemented as Next.js App Router API routes. Every endpoint lives underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/ai360/llms.txt
Use this file to discover all available pages before exploring further.
/api/utilities/ and acts as a thin, secure proxy between the Next.js frontend and upstream AI services — Google Gemini 2.5 Flash, Cloudflare Workers AI, and ImageKit. Because all service credentials are stored as server-side environment variables, client code never touches an API key. You call the route, the route calls the AI provider, and the result comes back in a consistent JSON shape.
Base URL
| Environment | Base URL |
|---|---|
| Development | http://localhost:3000 |
| Production | Your deployment URL (Vercel or custom domain) |
POST method unless explicitly noted. Paths are relative to the base URL.
Endpoints at a glance
POST /api/utilities/summarizer
Summarize any block of text into a concise, meaningful paragraph using Gemini 2.5 Flash.
POST /api/utilities/cold-email
Generate a short, persuasive cold email from a context prompt using Gemini 2.5 Flash.
POST /api/utilities/email-template-generator
Produce a complete HTML email template from a prompt, ready to drop into any email client.
POST /api/utilities/image-generator
Generate an image from a text prompt via Cloudflare Workers AI (FLUX.1 Schnell). Returns a base64-encoded PNG data URL.
POST /api/utilities/background-remover
Remove the background from an uploaded image using ImageKit’s processing pipeline.
POST /api/utilities/code-explainer
Explain a code snippet in plain language using Gemini 2.5 Flash.
POST /api/utilities/flowchart-generator
Generate a structured flowchart JSON from a natural-language description.
POST /api/utilities/resume-analyzer
Analyze a PDF resume against a job description, returning ATS, tone, content, structure, and skills scores. Accepts
multipart/form-data.GET /api/upload-auth
Return time-limited ImageKit upload credentials (token, expire, signature) for client-side direct uploads.
Authentication
All routes are server-side only. Upstream service credentials are injected at build/runtime via environment variables and are never exposed to the client:| Variable | Used by |
|---|---|
GEMINI_API_KEY | All Gemini-powered routes |
CLOUDFLARE_ID | Image Generator (Cloudflare Workers AI) |
CLOUDFLARE_API_KEY | Image Generator (Cloudflare Workers AI) |
IMAGEKIT_PRIVATE_KEY | Background Remover, Upload Auth |
Authorization header or token — the server handles authentication with each upstream service transparently. For environment setup instructions, see the Configuration page.
Content types
| Route | Request content type |
|---|---|
| Most endpoints | application/json |
/api/utilities/resume-analyzer | multipart/form-data (FormData) |
/api/upload-auth | No request body required |
multipart/form-data requests, do not set the Content-Type header manually. Let the browser or fetch set it automatically so the MIME boundary is generated correctly.
Error format
All routes return errors as a JSON object with a singleerror key containing a human-readable message:
| Status | Meaning |
|---|---|
400 | Missing or invalid request input (e.g., empty required field, wrong file type) |
500 | Upstream service failure (Gemini, Cloudflare, or ImageKit returned an error) |
Next steps
Resume Analyzer
Deep dive into the most advanced endpoint — structured JSON output, PDF ingestion, and multi-category ATS scoring.
Configuration
Set up your environment variables for Gemini, Cloudflare, and ImageKit so every route is ready to use.