Connect Imagga to ChatGPT: Automate Image Tagging, Faces, and Moderation
from the team behind Truto
Imagga in ChatGPT, in about a minute.
The best way to connect Imagga to ChatGPT is Elaichi: connect Imagga to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14‑day free trial and no credit card required.
- No credit card required
- 500+ connectors
- Credentials vaulted, never read back
-
Start your free trial
14 days free, no credit card required.
-
Connect Imagga
Once, in Elaichi. ChatGPT never gets more access than you have.
-
Add Elaichi to ChatGPT
In ChatGPT, open Plugins, press +, and paste the URL into Server URL. Sign in and approve.
https://api.elaichi.ai/mcp
Building Imagga into your own product? This guide is for you.
Connect Imagga to ChatGPT via an auto-generated MCP server to give your AI agents read and write access to computer vision tools, automating tagging, OCR, and moderation workflows.
The developer guide
Learn how to connect Imagga to ChatGPT using Truto's MCP Server. Automate image tagging, face detection, adult content moderation, and OCR extraction workflows.
If you are building AI agents that need to process visual data, connecting Imagga to ChatGPT allows your workflows to automate image tagging, face detection, smart cropping, and adult content moderation. By leveraging a Model Context Protocol (MCP) server, you can turn Imagga's powerful REST endpoints into native LLM tools. If your team uses Claude, check out our guide on connecting Imagga to Claude or explore our broader architectural overview on connecting Imagga to AI Agents.
Giving a Large Language Model (LLM) access to a computer vision API is an engineering challenge. You have to handle binary file uploads versus base64 encodings, manage asynchronous processing tickets, and translate complex bounding box coordinates into semantic context. You either spend weeks building, hosting, and maintaining a custom MCP server to translate LLM JSON arguments into Imagga's highly specific payload structures, or you use a managed infrastructure layer.
This guide breaks down exactly how to use Truto to generate a secure, authenticated MCP server for Imagga, connect it natively to ChatGPT, and execute complex image intelligence workflows using natural language.
The Engineering Reality of the Imagga API
A custom MCP server acts as a self-hosted integration layer. While the open MCP standard provides a predictable way for models like GPT-4o to discover tools, implementing it against Imagga's specific API design requires handling several unique architectural constraints.
If you decide to build a custom MCP server for Imagga, you own the entire API lifecycle. Here are the specific integration challenges you will encounter:
The Multipart vs Base64 vs URL Payload Trilemma
Imagga allows image submissions through three primary methods: a public image_url, a multipart/form-data binary upload (image), or a base64-encoded string (image_base64). LLMs cannot natively send multipart binary files. If you build a custom MCP server, you must write middleware that accepts a base64 string from the LLM, decodes it into a binary stream, and constructs a standard HTTP multipart form to send to Imagga. Truto's proxy handlers natively process the flat JSON schema arguments from the LLM and map them correctly to the required upstream content types, bridging the gap between text-based AI models and binary computer vision endpoints.
Polling Asynchronous Ticket Endpoints
Advanced Imagga features - such as face grouping and similar image index training - do not return results immediately. Instead, an initial POST request returns a ticket_id. The client must then poll the GET /tickets/{id} endpoint until the job is finalized. LLMs are stateless and terrible at asynchronous polling. Your MCP server must expose the ticket endpoint as a distinct tool and explicitly prompt the LLM to use the retrieved ticket_id to query the status in a secondary step, or you must build stateful webhook listeners into your custom server infrastructure.
Rate Limit Passthrough and IETF Standards
Imagga enforces strict rate limits based on your subscription tier. It is critical to understand that Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Imagga API returns an HTTP 429 Too Many Requests error, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The LLM client or agent orchestration layer is strictly responsible for interpreting these headers and executing retry/backoff logic. Do not assume your MCP middleware will absorb these errors for you.
Step-by-Step: Connecting Imagga to ChatGPT via MCP
To connect ChatGPT to Imagga, we will generate an MCP server URL that contains a cryptographic token. This single URL authenticates requests, handles proxy routing, and dynamically generates the JSON-RPC tool definitions derived from Imagga's API schemas.
Step 1: Connect Imagga to Truto
First, you need to establish an authenticated connection to Imagga. In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Imagga, and input your API Key and API Secret. Truto securely stores these credentials. Once connected, note your integrated_account_id.
Step 2: Generate the Imagga MCP Server
Truto scopes every MCP server to a single integrated account. You can create the MCP server using either the Truto UI or the API.
Method A: Via the Truto UI
- Navigate to the integrated account page for your Imagga connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration. For example, you can filter allowed methods to only
readoperations or specific tags likefacesorcategorization. - Click Create and copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/<token>).
Method B: Via the API You can programmatically generate this server URL using the Truto API. This is useful for dynamically spinning up MCP servers for multi-tenant SaaS environments.
curl -X POST https://api.truto.one/integrated-account/<INTEGRATED_ACCOUNT_ID>/mcp \
-H "Authorization: Bearer $TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Imagga Computer Vision Server",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["tagging", "moderation", "faces"]
}
}'The response returns your dedicated MCP URL. Treat this URL like a secret; it contains the hashed token required to authenticate JSON-RPC calls.
Step 3: Connect the MCP Server to ChatGPT
Now, you must register this server with your LLM client. You can do this through the ChatGPT interface or via a manual configuration file for local agents.
Method A: Via the ChatGPT UI
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Enable Developer mode (MCP support requires this flag to be toggled on).
- Under MCP servers / Custom connectors, click to add a new server.
- Set the Name to "Imagga Vision API".
- Paste the Truto MCP URL into the Server URL field.
- Click Save. ChatGPT will immediately ping the endpoint, execute the
tools/listJSON-RPC handshake, and make the Imagga tools available for tool calling.
Method B: Via Manual Config (for headless agents) If you are running a local instance of Claude Desktop, Cursor, or a custom LangChain agent, you use the standard Server-Sent Events (SSE) transport adapter provided by the MCP specification.
{
"mcpServers": {
"imagga-vision": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/<YOUR_TOKEN>"
]
}
}
}Hero Tools for Imagga
Once the MCP server is initialized, it dynamically generates tool definitions based on Imagga's OpenAPI documentation. Here are the highest-leverage operations your AI agent can now execute.
1. Analyze Images for Tags (list_all_imagga_tags)
This tool accepts a public image URL and returns a flat, sorted list of descriptive tags with their associated confidence scores. It is the workhorse of automated asset cataloging.
"I have a folder of product images. Please analyze
https://example.com/shoe.jpgand list all visual tags with a confidence score above 80%."
2. Detect and Locate Faces (list_all_imagga_faces_detections)
Detects human faces within an image URL. It returns a bounding box (x, y, width, height) and confidence score for each detected face, which the LLM can use to evaluate composition or demographic counts.
"Review the crowd photo at
https://example.com/crowd.jpg. How many distinct faces are visible, and what are their bounding box coordinates?"
3. Adult Content Moderation (list_all_imagga_adult_content_moderation)
Crucial for user-generated content workflows, this tool classifies an image URL into categories like safe, nsfw, or underwear, allowing the agent to automatically flag or reject uploads.
"Check this user avatar URL for inappropriate content. If the
nsfwconfidence score is above 30%, alert me so I can suspend the account."
4. Smart Cropping Coordinates (list_all_imagga_croppings)
Calculates the most visually important region of an image and returns optimal crop coordinates. The LLM can use this to feed instructions to a downstream image processor like ImageMagick.
"I need to generate a 16:9 thumbnail for this landscape image. Use the smart cropping tool to give me the optimal x1, y1, x2, and y2 coordinates."
5. OCR Text Extraction (list_all_imagga_text)
An experimental but powerful tool that detects readable text within an image and returns the content along with its bounding box location. Excellent for processing receipts, signs, or scanned documents.
"Extract all the text from this scanned invoice URL. Structure the output as a JSON object containing the merchant name and total amount."
6. Upload Binary Images (create_a_imagga_upload)
For environments where public URLs are not an option, this tool accepts a base64-encoded image (image_base64), uploads it to Imagga's secure temporary storage, and returns an upload_id that can be passed to all other analysis tools.
"Here is a base64 string of a secure document. Upload it to Imagga, get the upload ID, and then run the text moderation tool on that specific ID."
7. Retrieve Async Job Tickets (get_single_imagga_ticket_by_id)
Required for managing Imagga's asynchronous tasks (like face grouping). The agent checks the status of a ticket_id to determine if the batch processing is is_final.
"Check the status of face grouping ticket
req-12345. If it is finished, summarize the cluster results. If not, wait 5 seconds and check again."
For the complete tool inventory, including categorization, face similarity, and background removal endpoints, review the Imagga integration page.
Workflows in Action
When you connect Imagga to ChatGPT, the model gains the ability to orchestrate multi-step computer vision pipelines autonomously.
Scenario 1: Automated User-Generated Content Moderation
Product managers building social platforms need to moderate user avatars and extract metadata for search indexing. Instead of writing custom cron jobs, an AI agent handles the triage.
"A user just uploaded a new profile picture at
https://cdn.example.com/user_1029.jpg. Run a content moderation check. If it is safe, extract the dominant colors and assign descriptive tags so we can categorize their profile."
How the agent executes this:
- Calls
list_all_imagga_adult_content_moderationwith the URL. - The agent evaluates the JSON response. If the
safecategory has a high confidence score, it proceeds. - Calls
list_all_imagga_colorsto extract foreground and background hex codes. - Calls
list_all_imagga_tagsto get contextual keywords (e.g., "outdoors", "sunglasses", "smile"). - Returns a structured JSON payload to the user containing the approval status, colors, and tags.
flowchart TD
A["ChatGPT (Agent)"] -->|"1. list_all_imagga_adult_content_moderation"| B["Imagga API<br>(Moderation)"]
B -->|"2. Returns { safe: 99% }"| A
A -->|"3. list_all_imagga_colors"| C["Imagga API<br>(Color Extract)"]
C -->|"4. Returns { foreground: '#1a1a1a' }"| A
A -->|"5. list_all_imagga_tags"| D["Imagga API<br>(Tagging)"]
D -->|"6. Returns ['portrait', 'smile']"| AScenario 2: Processing Secure Base64 Documents
Often, internal documents cannot be exposed via public URLs. An IT administrator needs to extract text from a locally stored image of a server rack configuration panel.
"I am pasting a base64 string of a server rack label. Upload this securely to Imagga, extract the text via OCR, and list out any MAC addresses you find in the recognized text."
How the agent executes this:
- Calls
create_a_imagga_uploadpassing theimage_base64argument. - Imagga responds with an
upload_id(e.g.,upl_987654321). - The agent calls
get_single_imagga_text_by_id, passingid: upl_987654321. - Imagga returns the OCR text blocks. The LLM parses the strings, uses its internal logic to identify MAC address patterns (e.g.,
00:1B:44:11:3A:B7), and outputs the final list to the user.
sequenceDiagram
participant ChatGPT as "ChatGPT (Client)"
participant Truto as "Truto MCP Server"
participant Imagga as "Imagga API"
ChatGPT->>Truto: create_a_imagga_upload(image_base64)
Truto->>Imagga: POST /v2/uploads (multipart)
Imagga-->>Truto: { "upload_id": "upl_123" }
Truto-->>ChatGPT: Return upload_id
ChatGPT->>Truto: get_single_imagga_text_by_id(id: "upl_123")
Truto->>Imagga: GET /v2/text/upl_123
Imagga-->>Truto: { "text": [ { "data": "MAC: 00:1B..." } ] }
Truto-->>ChatGPT: Return OCR dataSecurity and Access Control
Exposing an enterprise computer vision API to an LLM requires strict boundary setting to prevent accidental data leakage or excessive API usage.
- Method Filtering: When generating the MCP token, you can set
config.methodsto["read"](which encompassesgetandlistoperations) to ensure the AI agent can only analyze public URLs and cannot upload arbitrary binary files to your Imagga account. - Tag Filtering: You can restrict the MCP server's scope by defining
config.tags: ["moderation"]. This ensures the LLM is completely blind to tools like face similarity or index clustering, minimizing the attack surface. - Dual Authentication: By setting
require_api_token_auth: trueduring server creation, you enforce that simply possessing the MCP URL is not enough. The connecting client must also inject a valid Truto API token into the HTTP headers, providing enterprise-grade security for internal toolnets. - Ephemeral Servers: Pass an
expires_atISO datetime when creating the MCP server. Truto's Durable Object architecture schedules an exact-time alarm to automatically delete the token and KV entries, perfect for temporary agent sessions.
Moving Faster with Auto-Generated MCP Servers
Building a custom MCP server for Imagga forces your engineering team to write parsing middleware for flat LLM arguments, manage multipart form-data streams, and build retry logic for IETF-compliant rate limits. Every time Imagga releases a new endpoint - like structured tagging v3 - your custom server requires a code change, a PR review, and a redeployment.
Using Truto's MCP infrastructure changes this paradigm. Because Truto's tool generation is dynamic and documentation-driven, the moment an API endpoint is mapped in the integration schema, it becomes immediately available as an AI tool. You get full OAuth management, request logging, and granular access controls out of the box, allowing your team to focus on designing agent workflows rather than maintaining JSON-RPC middleware.
FAQ
- What is the easiest way to connect Imagga to ChatGPT?
- The best way to connect Imagga to ChatGPT is Elaichi: connect Imagga to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14-day free trial and no credit card required.
- How does Truto handle Imagga's API rate limits?
- Truto does not retry, throttle, or apply backoff on rate limit errors. When Imagga returns an HTTP 429 error, Truto passes it to the caller and normalizes the rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The LLM client must handle retries.
- Can I prevent ChatGPT from uploading binary files to Imagga?
- Yes. When creating the MCP server in Truto, you can use method filtering by setting config.methods to ["read"]. This restricts the LLM to get and list operations (like analyzing public URLs) and prevents write operations like uploading files.
- How do AI agents handle Imagga's asynchronous tickets?
- Imagga's face grouping and indexing endpoints return a ticket_id. The LLM must be prompted to use the get_single_imagga_ticket_by_id tool to poll the ticket status until the is_final flag returns true.