API Documentation
Everything you need to integrate apiai.me into your application.
Overview
apiai.me gives you a library of pre-built Tools — ready-to-use API endpoints for image generation, editing, background removal, video creation, and more. Each tool is a single REST call with its own parameters, defaults, and pricing.
You can also create Pipelines that chain multiple tools into one API call, passing data from step to step automatically.
All API responses are JSON unless the endpoint returns binary data (images, video). Errors follow a consistent format:
{ "error": "description of what went wrong" }
How It Works
1. Browse the Toolbox
Log in to the Dashboard and open the API Toolbox. You'll see every tool available to your account — each with its parameters, defaults, options, and a ready-made curl command.
2. Test in the playground
Expand any tool to see its full parameter form. Adjust values, upload an image, and hit Run to test it live — right in the browser. The result appears instantly so you can iterate before writing any code.
3. Call the API
Copy the generated curl command (or use any HTTP client) and call the endpoint from your app. Every tool follows the same pattern:
curl -X POST https://apiai.me/api/process/{tool-slug} \
-H "X-API-Key: ak_xxxx" \
-F "image=@photo.png" \
-F "prompt=your prompt here" \
--output result.png
4. Build pipelines (optional)
Need multiple steps? Create a Pipeline that chains tools together — e.g. generate an image, then remove its background, then convert to greyscale — all in a single API call.
Authentication
Sign up at apiai.me to create your account. Authentication is passwordless — you receive a one-time code by email, verify it, and receive a session token for the dashboard. Your api_key is shown once at registration; use it for all programmatic API calls.
Step 1 — Request a login code
Request Body
| Field | Type | Description |
|---|---|---|
| email required | string | The email associated with your account |
curl -X POST https://apiai.me/api/login \
-H "Content-Type: application/json" \
-d '{"email": "you@company.com"}'
{ "requires_verification": true, "email": "you@company.com" }
A 6-digit one-time code is emailed to you. Codes expire after 24 hours.
Step 2 — Verify the code and get your session
Request Body
| Field | Type | Description |
|---|---|---|
| email required | string | Same email used in the login request |
| code required | string | The 6-digit code from the email |
curl -X POST https://apiai.me/api/verify \
-H "Content-Type: application/json" \
-d '{"email": "you@company.com", "code": "482916"}'
{ "session_token": "sess_...", "username": "you", "email": "you@company.com" }
Your API key (ak_...) is provided once at registration. Store it securely — it cannot be retrieved later. You can regenerate a new key from the Dashboard at any time.
Step 3 — Use your API key
Pass your API key in the X-API-Key header on every protected request.
X-API-Key: ak_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
If your key is compromised, you can regenerate it from the Dashboard — the old key is immediately invalidated.
Rate Limits
To protect service stability, the API enforces the following limits:
| Limit | Scope | Value |
|---|---|---|
| Concurrent requests | Per user | 2 in-flight |
| Server-wide concurrency | Global | 5 in-flight |
| Request body size | Per request | 20 MB |
When you exceed the per-user concurrency limit, the API returns 429 Too Many Requests:
{ "error": "Too many concurrent requests. Maximum 2 in-flight requests per user." }
When the server is at full capacity, the API returns 503 Service Unavailable:
{ "error": "Server at capacity. Maximum 5 concurrent requests. Please retry shortly." }
Wait for an in-flight request to complete before sending the next one, or use the Batch API for high-volume workloads — batched items are queued server-side and don't count against the concurrency limit.
Base URL
https://apiai.me/api
All endpoint paths below are relative to this base URL.
List Tools
List all tools available to your account. Each tool has a slug used in the process endpoint.
curl https://apiai.me/api/workflows \ -H "X-API-Key: ak_xxxx"
[
{
"id": 7,
"slug": "greyscale",
"name": "Greyscale",
"description": "Convert image to greyscale",
"endpoint": "/api/process/greyscale",
"method": "POST",
"type": "workflow",
"accepted_inputs": ["image"],
"required_inputs": ["image"],
"response_type": "image",
"output_types": ["image"],
"params": [ ... ]
},
{
"id": 3,
"slug": "logo-digitalize",
"name": "Logo Digitalize",
"description": "Multi-step logo pipeline",
"endpoint": "/api/pipeline/logo-digitalize",
"method": "POST",
"type": "pipeline",
"params": []
}
]
The list includes both individual tools (type: "workflow") and admin-configured pipelines (type: "pipeline"). Use the endpoint field to determine the correct URL to call.
accepted_inputs lists which input types the tool understands (e.g. image, text, video, audio). required_inputs is the subset of those that are mandatory — anything in accepted_inputs but not in required_inputs is optional.
Run a Tool
Run a tool. Accepts multipart/form-data. The response type depends on the tool — image, video, or JSON text (check output_types in the tool list).
Parameters
| Field | Type | Description |
|---|---|---|
| image optional | file / file[] | Input image (PNG, JPG, WebP). Required for image-editing tools; optional or unused for generation tools. Some tools accept multiple images — check max_images in the tool list. |
| prompt optional | string | Text prompt — required for generation tools, optional for editing tools. |
| {param} optional | string | Any tool-specific parameter. Use GET /api/workflows to list available params per tool. |
Response types
| response_type | Content-Type | Save with |
|---|---|---|
image (default) | image/png, image/jpeg, etc. | --output result.png |
video | video/mp4 | --output result.mp4 |
audio | audio/mpeg, audio/wav, etc. | --output result.mp3 |
text | application/json | --output result.json |
curl -X POST https://apiai.me/api/process/greyscale \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo.png" \ --output result.png
curl -X POST https://apiai.me/api/process/create-image \ -H "X-API-Key: ak_xxxx" \ -F "prompt=a minimalist tech logo" \ --output result.png
curl -X POST https://apiai.me/api/process/generate-video \ -H "X-API-Key: ak_xxxx" \ -F "prompt=aerial view of a coral reef" \ -F "ASPECT_RATIO=16:9" \ -F "DURATION=4" \ --output result.mp4
curl -X POST https://apiai.me/api/process/nano-banana-2 \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo1.png" \ -F "image=@photo2.png" \ -F "prompt=combine these images" \ --output result.png
Streaming progress (long-running tools)
For Replicate-backed tools that can take minutes (video generation, complex image models), append /stream to get
real-time progress updates as a Server-Sent Events (SSE) stream. When the job finishes, pick up the result from
GET /api/result/:id using the result_id in the final event.
SSE event type | Meaning |
|---|---|
created | Prediction submitted to Replicate |
starting | Replicate is booting the model |
processing | Model is actively generating (sent on each poll) |
done | Job complete — contains result_id and content_type |
error | Job failed — contains message |
# Step 1 – submit and stream progress (-N disables curl buffering)
curl -N -X POST https://apiai.me/api/process/generate-video/stream \
-H "X-API-Key: ak_xxxx" \
-F "prompt=aerial view of a coral reef" \
-F "ASPECT_RATIO=16:9"
# Each SSE line looks like:
# data: {"type":"starting","elapsed_ms":0}
# data: {"type":"processing","elapsed_ms":4200}
# data: {"type":"done","elapsed_ms":47300,"result_id":"a3f9...","content_type":"video/mp4"}
# Step 2 – download the result using the result_id from the done event
curl https://apiai.me/api/result/a3f9... \
-H "X-API-Key: ak_xxxx" \
--output result.mp4
Results are stored for 10 minutes and can only be retrieved once. Streaming requires the tool to be a Replicate workflow; other server types should use the synchronous endpoint.
Check supports_prompt and output_types in the tool list to know what each tool expects and returns.
Response headers:
| Header | Description |
|---|---|
| X-Request-ID | Unique request identifier (UUID) |
| X-Processing-Time | Server-side processing time in ms |
| X-Cost | Cost charged for this request in USD |
| X-Balance-Remaining | Your account balance after this request |
| X-Workflow | The workflow or pipeline slug that was executed |
| X-Pipeline-Steps | Number of steps (only for multi-step pipelines) |
Pipelines
Execute a multi-step pipeline. Pipelines chain multiple tools together — the output of each step feeds into the next.
Parameters
| Field | Type | Description |
|---|---|---|
| image required | file | The input image |
curl -X POST https://apiai.me/api/pipeline/logo-digitalize \ -H "X-API-Key: ak_xxxx" \ -F "image=@logo.png" \ --output result.png
Batch Processing
Process multiple images through a single workflow in one request. The server queues all items, processes them in parallel, and provides real-time progress via SSE. Results are available as a ZIP download for 24 hours.
Create a new batch job. Upload multiple images and specify a workflow slug (or flow:slug for a user pipeline). All images will be processed with the same workflow/pipeline and parameters.
Parameters
| Field | Type | Description |
|---|---|---|
| workflow required | string | Workflow slug (e.g. remove-bg) or flow slug prefixed with flow: (e.g. flow:my-pipeline) |
| images required | file[] | Multiple image files (max limit set by server, default 50) |
| any param | string | Additional workflow/pipeline-specific parameters (applied to all images) |
curl -X POST https://apiai.me/api/batch \ -H "X-API-Key: ak_xxxx" \ -F "workflow=remove-bg" \ -F "images=@photo1.png" \ -F "images=@photo2.png" \ -F "images=@photo3.png"
curl -X POST https://apiai.me/api/batch \ -H "X-API-Key: ak_xxxx" \ -F "workflow=flow:my-pipeline" \ -F "images=@photo1.png" \ -F "images=@photo2.png"
Response: 201 Created with job ID, status, total items, and estimated cost.
List your batch jobs (most recent first, max 50).
curl https://apiai.me/api/batch \ -H "X-API-Key: ak_xxxx"
Get batch job status and all item details.
curl https://apiai.me/api/batch/42 \ -H "X-API-Key: ak_xxxx"
Cancel a running batch job. Items already completed are kept; remaining items are skipped.
curl -X POST https://apiai.me/api/batch/42/cancel \ -H "X-API-Key: ak_xxxx"
Download all completed results as a ZIP archive. Available for 24 hours after job completion.
curl https://apiai.me/api/batch/42/download \ -H "X-API-Key: ak_xxxx" \ --output results.zip
Batch progress is also streamed via SSE Events with event types batch_created and batch_progress.
Usage
Get aggregated usage statistics for your account.
curl https://apiai.me/api/usage \ -H "X-API-Key: ak_xxxx"
Logs
Retrieve recent request logs for your account.
Query Parameters
| Param | Type | Description |
|---|---|---|
| limit optional | int | Number of logs to return (default 50, max 200) |
curl https://apiai.me/api/logs?limit=20 \ -H "X-API-Key: ak_xxxx"
SSE Events
Server-Sent Events stream. Pushes real-time updates (new logs, usage changes) to connected clients. Authentication is via the X-API-Key header.
Note: the browser EventSource API does not support custom headers. Use fetch() with a readable stream, or pass the key via a proxy.
const resp = await fetch('/api/events', {
headers: { 'X-API-Key': 'ak_xxxx' }
});
const reader = resp.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
console.log(decoder.decode(value));
}
Billing
Payments are processed securely via Stripe. Each API call deducts from your account balance. When your balance is insufficient you'll receive a 402 Payment Required response.
Returns your current account balance.
curl https://apiai.me/api/account/balance \ -H "X-API-Key: ak_xxxx"
{ "balance": 47.50 }
Create a Stripe Checkout session to top up your balance ($10, $50, or $100). Returns a URL to redirect to for payment. Your card is saved for future auto-refill charges.
Body Parameters (JSON)
| Param | Type | Description |
|---|---|---|
| amount required | number | Top-up amount: 10, 50, or 100 |
curl -X POST https://apiai.me/api/account/create-checkout \
-H "X-API-Key: ak_xxxx" \
-H "Content-Type: application/json" \
-d '{"amount": 50}'
{ "url": "https://checkout.stripe.com/c/pay/..." }
Get your auto-refill settings. When enabled, your saved card is charged automatically when your balance drops below $5.
{ "enabled": true, "amount": 50 }
Enable or disable auto-refill. Requires a saved payment method (make at least one Stripe checkout payment first).
Body Parameters (JSON)
| Param | Type | Description |
|---|---|---|
| enabled required | bool | Turn auto-refill on or off |
| amount required | number | Amount to charge: 10, 50, or 100 |
curl -X PUT https://apiai.me/api/account/auto-refill \
-H "X-API-Key: ak_xxxx" \
-H "Content-Type: application/json" \
-d '{"enabled": true, "amount": 50}'
List Pipelines
List your custom pipelines (user-created tool chains).
curl https://apiai.me/api/flows \ -H "X-API-Key: ak_xxxx"
Create Pipeline
Create a custom pipeline by chaining existing tools. You must have access to all referenced tools. Optionally provide a flow_config for node-based pipelines with clean parameter names.
Request Body
| Field | Type | Description |
|---|---|---|
| name required | string | Display name for the pipeline |
| slug required | string | URL-safe slug (e.g. my-pipeline) |
| workflow_ids required | int[] | Ordered list of tool IDs (from /workflows) |
| flow_config optional | object | Node-based pipeline config. Contains nodes (array of node objects with tool slug and per-param config) and output_node (ID of final node). Each param can be expose (user API param), fixed (baked-in), or from_node (wired from previous node). |
curl -X POST https://apiai.me/api/flows \
-H "X-API-Key: ak_xxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "My Pipeline",
"slug": "my-pipeline",
"workflow_ids": [3, 5]
}'
curl -X POST https://apiai.me/api/flows \
-H "X-API-Key: ak_xxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Generate & Remove BG",
"slug": "gen-remove-bg",
"workflow_ids": [3, 5],
"flow_config": {
"nodes": [
{
"id": "node_1",
"workflow": "seedream-4",
"params": {
"prompt": {"source": "expose", "expose": "prompt", "required": true},
"style": {"source": "fixed", "fixed": "photorealistic"}
}
},
{
"id": "node_2",
"workflow": "remove-background",
"params": {
"image": {"source": "from_node", "from_node": "node_1", "is_image": true}
}
}
],
"output_node": "node_2"
}
}'
Execute Pipeline
Run a custom pipeline. Data passes through each step sequentially. For node-based pipelines, use the clean parameter names shown in /flows. For legacy pipelines, parameters are step-suffixed (e.g. prompt_1).
Pipelines may include gate nodes that validate content before proceeding. If a gate rejects the input, the pipeline stops early and returns 422 Unprocessable Entity with an error message explaining why. Gates can expose a named input parameter (e.g. check_image) so the API caller can provide content specifically for the gate to evaluate.
If an exposed image input supports multiple uploads (for example a first step backed by a workflow with max_images > 1), repeat that same multipart field name multiple times in one request.
| Field | Type | Description |
|---|---|---|
| image | file | Input image. Optional if the pipeline supports prompts. For node-based pipelines, use the exposed param name (e.g. image). Repeat the field to send multiple images when the pipeline supports it. |
| prompt optional | string | Text prompt (for pipelines whose first step supports generation) |
| {param} optional | string | Any pipeline parameter. Node-based pipelines use clean names (e.g. style, aspect_ratio); legacy pipelines use step-suffixed names (e.g. style_1). |
curl -X POST https://apiai.me/api/flow/gen-remove-bg \ -H "X-API-Key: ak_xxxx" \ -F "prompt=a cute dog on white background" \ --output result.png
curl -X POST https://apiai.me/api/flow/my-pipeline \ -H "X-API-Key: ak_xxxx" \ -F "image=@input.png" \ --output result.png
curl -X POST https://apiai.me/api/flow/my-pipeline \ -H "X-API-Key: ak_xxxx" \ -F "image=@input-1.png" \ -F "image=@input-2.png" \ --output result.png
curl -X POST https://apiai.me/api/flow/create-and-remove-bg \ -H "X-API-Key: ak_xxxx" \ -F "prompt=a cute dog on a white background" \ --output result.png
Quality Gates
Quality gates are special pipeline nodes that evaluate content (image, text, or both) against a custom prompt and return a YES or NO decision. They are powered by a fast AI model (~$0.001 per evaluation) and enable automated content moderation, quality control, and conditional routing inside pipelines.
How it works
A gate node receives the output from the previous step (image and/or text) and evaluates it against the gate prompt — a plain-language question like "Is this image safe for all audiences?" or "Does the product appear clearly?". The AI responds YES or NO.
Branching
Each branch (YES / NO) can be configured to:
| Action | Behaviour |
|---|---|
next | Continue to the next node in the pipeline (default for YES) |
stop | Stop the pipeline and return a message (default for NO) |
{node_id} | Jump to a specific node — enables conditional routing |
Response behaviour
When a gate stops the pipeline:
| Branch | HTTP Status | Response body |
|---|---|---|
| NO → stop | 422 | {"error": "...", "gate_node": "...", "gate_response": "...", "cost": ...} |
| YES → stop | 200 | {"message": "...", "gate_node": "...", "gate_response": "...", "cost": ...} |
When a gate continues (next or branch), the previous image and text are forwarded to the target node automatically.
Custom messages
Each branch can define a custom message returned when the pipeline stops at that branch. If no message is set, defaults are used ("Content did not pass quality gate" for NO, "Pipeline completed" for YES).
Use cases
- Content moderation — block unsafe, off-brand, or policy-violating outputs before delivery
- Quality control — reject blurry, cropped, or low-quality generated images
- Conditional routing — send YES results to one processing path and NO results to another
- Approval workflows — gate on subjective criteria like brand consistency or style match
Quality Gate
Ask any YES/NO question about an image and/or text. A general-purpose evaluation endpoint powered by fast AI (~$0.001 per call). Use for content moderation, quality checks, object detection, classification, and more. This is the standalone version of the Quality Gate node used inside pipelines.
Request
Send as multipart/form-data:
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | A YES/NO question to evaluate (e.g. "Does this image contain a person?") |
image | file | No* | Image file to evaluate (JPEG, PNG, WebP, GIF) |
image_base64 | string | No* | Alternative: base64-encoded image data |
text | string | No* | Text content to evaluate |
* At least one of image, image_base64, or text is required alongside the prompt.
Response (200 OK)
{
"version": "1.0",
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"answer": true,
"response": "YES",
"prompt": "Does this image contain a person?",
"latency_ms": 312
}
Response fields
| Field | Type | Description |
|---|---|---|
answer | boolean | true = YES, false = NO |
response | string | Raw model response text |
prompt | string | The prompt that was evaluated |
latency_ms | integer | Evaluation time in milliseconds |
Example prompts
| Use case | Prompt |
|---|---|
| Person detection | Does this image contain a person? |
| Quality check | Is this a high-quality, well-lit photograph? |
| Transparency | Does this image have a transparent background? |
| NSFW filter | Does this image contain NSFW or inappropriate content? |
| Text detection | Does this image contain readable text? |
| Brand check | Does this image contain a company logo? |
| Text moderation | Is this text toxic or offensive? (with text field) |
curl examples
curl -X POST https://apiai.me/api/v1/quality-gate \ -H "X-API-Key: ak_xxxx" \ -F "prompt=Does this image contain a person?" \ -F "image=@photo.jpg"
curl -X POST https://apiai.me/api/v1/quality-gate \ -H "X-API-Key: ak_xxxx" \ -F "prompt=Is this text toxic or offensive?" \ -F "text=Hello, this is a friendly message"
curl -X POST https://apiai.me/api/v1/quality-gate \ -H "X-API-Key: ak_xxxx" \ -F "prompt=Does this product image match the description?" \ -F "image=@product.jpg" \ -F "text=Red leather handbag with gold clasp"
Moderation: Check Image
Evaluate an image against a configurable policy and receive a structured JSON decision. Always returns 200 for successful checks — the decision (allow, reject, or review) is in the response body, not the HTTP status code. Powered by a fast AI model (~$0.001 per check).
Request
Send as multipart/form-data:
| Parameter | Type | Required | Description |
|---|---|---|---|
image | file | Yes* | Image file to check (JPEG, PNG, WebP, GIF) |
image_base64 | string | Yes* | Alternative: base64-encoded image data |
policy | string | No | Built-in policy slug (see table below) or any custom label. Default: general |
policy_prompt | string | No | Custom moderation instructions. When supplied, overrides the built-in policy prompt. |
metadata | JSON string | No | Caller metadata (passed through for your reference) |
* Provide either image or image_base64, not both.
Built-in policies
Pass one of these slugs as policy and omit policy_prompt to use the pre-built moderation instructions. You can override any preset by supplying your own policy_prompt.
| Policy slug | What it checks |
|---|---|
general | General appropriateness — offensive, violent, or explicit content (default) |
nsfw | Sexually explicit or adult content, nudity |
adult | Alias for nsfw |
violence | Graphic violence, gore, weapons used against people |
brand-safety | Safe for mainstream brand advertising (combines NSFW + violence + hate) |
product-photo | E-commerce quality — clear, well-lit product on clean background |
hate-speech | Hate symbols, extremist imagery, dehumanising content |
spam | Junk, watermarked stock photos, auto-generated filler, test patterns |
For domain-specific checks (e.g. "does this image contain our product logo?") use a custom policy label and supply policy_prompt with your own instructions.
Response (200 OK)
{
"version": "1.0",
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"decision": "reject",
"confidence": 0.97,
"policy": "dog-only-v1",
"reasons": [
{
"code": "NO_DOG_DETECTED",
"message": "No dog detected in image"
}
],
"signals": {
"dog_detected": false,
"nsfw": false
},
"latency_ms": 412
}
Decision values
| Decision | Meaning | When to use |
|---|---|---|
allow | Image passes the policy | Proceed with processing |
reject | Image fails the policy | Block or discard |
review | Ambiguous / low confidence | Queue for human review |
HTTP status codes
| Status | Meaning |
|---|---|
200 | Check completed — decision is in the body |
400 | Invalid request (missing image, bad mime type, too large) |
401/403 | Authentication error |
402 | Insufficient balance |
429 | Rate limit exceeded |
500 | Internal moderation failure |
Error responses (non-200)
{"error": {"code": "INVALID_IMAGE", "message": "Unsupported image type"}}
Response headers
| Header | Description |
|---|---|
X-Request-ID | Unique request ID (send your own via header to correlate) |
X-Processing-Time | Server-side latency in ms |
X-Cost | Cost charged for this check |
X-Balance-Remaining | Your remaining balance |
curl examples
curl -X POST https://apiai.me/api/v1/moderation/check-image \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo.jpg" \ -F "policy=nsfw"
curl -X POST https://apiai.me/api/v1/moderation/check-image \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo.jpg" \ -F "policy=brand-safety"
curl -X POST https://apiai.me/api/v1/moderation/check-image \ -H "X-API-Key: ak_xxxx" \ -F "image=@photo.jpg" \ -F "policy=dog-only-v1" \ -F 'policy_prompt=Check whether the image contains a dog as the main subject'
curl -X POST https://apiai.me/api/v1/moderation/check-image \ -H "X-API-Key: ak_xxxx" \ -F "image_base64=$(base64 -i photo.jpg)" \ -F "policy=nsfw"
curl -X POST https://apiai.me/api/v1/moderation/check-image \ -H "X-API-Key: ak_xxxx" \ -H "X-Request-ID: my-correlation-id-123" \ -F "image=@photo.jpg"
Pipeline integration
This endpoint uses the same evaluation engine as Quality Gates in pipelines. When a gate node is used inside a pipeline, downstream condition nodes can branch on decision, confidence, and reasons[].code from the structured moderation result.
Delete Pipeline
Delete a custom pipeline by its ID.
curl -X DELETE https://apiai.me/api/flows/42 \ -H "X-API-Key: ak_xxxx"
MCP Server
Use apiai.me directly from AI-enabled editors and local AI tools like VS Code (Copilot), Cursor, Windsurf, Ollama, and others that support the Model Context Protocol. No binary to install — just point your client at our hosted MCP endpoint.
The server uses the Streamable HTTP transport. Authenticate with your API key via the X-API-Key header.
VS Code — .vscode/mcp.json
{
"servers": {
"apiai": {
"type": "http",
"url": "https://apiai.me/api/mcp",
"headers": {
"X-API-Key": "ak_xxxx"
}
}
}
}
Cursor — .cursor/mcp.json
{
"mcpServers": {
"apiai": {
"url": "https://apiai.me/api/mcp",
"headers": {
"X-API-Key": "ak_xxxx"
}
}
}
}
Ollama — ~/.ollama/mcp.json
{
"mcpServers": {
"apiai": {
"url": "https://apiai.me/api/mcp",
"headers": {
"X-API-Key": "ak_xxxx"
}
}
}
}
Available tools
Once connected, your AI assistant has access to these tools:
| Tool | Description |
|---|---|
list_workflows | Discover available tools, parameters, and pricing |
list_flows | List your custom pipelines |
generate_image | Generate an image from a text prompt |
edit_image | Process an image through a tool (base64 input/output) |
run_flow | Execute a pipeline |
check_balance | Check your account balance |
get_account | Get account details |
Example prompts
"Generate a minimalist tech logo using apiai" "Remove the background from this image (pass base64)" "Run my create-and-remove-bg pipeline with prompt 'a cute dog'" "What tools do I have access to?" "Check my apiai balance"