CometAPI MCP server for AI agents

Live

BEARER TOKEN

AI MODEL GATEWAY

AI

CometAPI gives your agent one gateway to many AI models in your CometAPI account: chat and embeddings, image generation with FLUX and Midjourney, video with Kling, Runway, Sora, and Grok, music with Suno, and task status checks.

  • Per-user credentials: each call uses the actual user's access token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
CometAPI
agent · Acme Q3
Run
Generate a 5 second video of a paper boat on a rain puddle.
S
cometapi_kling_text_to_video
870ms
AI gateway agent
Started a Kling text-to-video task for the paper boat prompt. I will check its status until the video is ready.
Sources: CometAPI Kling, 1 task
cometapi
1 task
18:29
Message Claude...

Tools your AI gateway agent reaches for on CometAPI, scoped per user.

CALL ANY TOOL
37 tools for AI models in CometAPI: chat and embeddings, image generation, video from Kling, Runway, Sora, MiniMax, and Grok, Suno music, Midjourney, 3D, moderation, and task status.
cometapi_api_key_usage_get
Get api key usage
Get the quota, usage, expiration and model limits of the connected CometAPI API key. Returns the key's name, total and used quota, remaining quota, expiry and allowed models. Use this to check the remaining balance before large jobs.
Parameters
Name
Type
Required
Description
—
No parameters required
cometapi_chat_completion_create
Create chat completion
cometapi_embeddings_create
Create embeddings
cometapi_flux_image_generate
Generate flux image
cometapi_flux_result_get
Get flux result
cometapi_gemini_content_generate
Generate gemini content
cometapi_grok_video_generate
Generate grok video
cometapi_grok_video_get
Get grok video
cometapi_hunyuan3d_job_create
Create hunyuan3d job
cometapi_hunyuan3d_job_get
Get hunyuan3d job
cometapi_image_generate
Generate image
cometapi_image_task_get
Get image task
cometapi_kling_text_to_video
Kling text to video
cometapi_midjourney_action
Midjourney action
cometapi_midjourney_blend
Midjourney blend
cometapi_midjourney_describe
Midjourney describe
cometapi_midjourney_task_get
Get midjourney task
cometapi_midjourney_tasks_list
List midjourney tasks
cometapi_minimax_video_create
Create minimax video
cometapi_minimax_video_get
Get minimax video
cometapi_models_list
List models
cometapi_moderation_create
Create moderation
cometapi_replicate_prediction_create
Create replicate prediction
cometapi_replicate_prediction_get
Get replicate prediction
cometapi_runway_task_get
Get runway task
cometapi_runway_text_to_video
Runway text to video
cometapi_sora_video_remix
Sora video remix
cometapi_suno_lyrics_generate
Generate suno lyrics
cometapi_suno_task_get
Get suno task
cometapi_suno_tasks_list
List suno tasks

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// CometAPI tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cometapi"], toolNames: [
    "cometapi_chat_completion_create",
    "cometapi_image_generate",
    "cometapi_kling_text_to_video"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Write a short product blurb, generate a hero image for it, and start a Kling video from the same idea" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cometapi"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Write a short product blurb, generate a hero image for it, and start a Kling video from the same idea" }],
  tools,
});

// Execute the tool call with the user's vaulted CometAPI access token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cometapi"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Write a short product blurb, generate a hero image for it, and start a Kling video from the same idea" }],
  tools,
});

// Tool call runs with the user's vaulted CometAPI access token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["cometapi"] }, pageSize: 100,
});

const agent = new Agent({
  name: "ai_gateway_agent",
  model: "gemini-2.5-pro",
  instruction: "CometAPI tools scoped to this user",
  tools,
});

await agent.run("Write a short product blurb, generate a hero image for it, and start a Kling video from the same idea");
Try these prompts
Copy any prompt into your agent. Each maps directly to a CometAPI tool. Click to copy, paste into your agent, done.
Chat and embeddings
Copy the prompt
Copied
Generate a chat reply with a CometAPI model.
Copy the prompt
Copied
Create embeddings for these 10 product descriptions.
Copy the prompt
Copied
Check this text for harmful content.
Images and video
Copy the prompt
Copied
Generate an image of a mountain lake at sunrise.
Copy the prompt
Copied
Start a Kling video from this text prompt.
Copy the prompt
Copied
Check the status of this video task.
Music and account
Copy the prompt
Copied
Generate song lyrics about a road trip.
Copy the prompt
Copied
Start a Suno song from this description.
Copy the prompt
Copied
Show the quota and usage of my CometAPI key.
SEE HOW AUTH WORKS
Each user connects their own CometAPI access token once; Scalekit sends it with every call. Tokens stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
CometAPI
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
CometAPI
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
CometAPI
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
CometAPI
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other AI connectors.
GTM and RevOps Teams
Competitive intelligence briefing agent
Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
Support and Ops Teams
Support triage agent
Fetches new Zendesk tickets, classifies them by type and urgency, searches the Notion knowledge base for an answer, and routes what it cannot resolve to Slack. Every call runs on the support agent's own delegated OAuth.
Test other agents
See the same per-user auth pattern across other AI connectors.
GTM
Competitive intelligence briefing agent
Scan Gong calls for competitor mentions, match each one to its Notion battlecard, and DM every affected rep a single Slack digest.
SUPPORT
Support triage agent
Classify new Zendesk tickets, search the Notion knowledge base for an answer, and route what it cannot resolve to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared CometAPI access token looks fine in a demo. In production every video or image generation looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
CometAPI today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access CometAPI as the user or through a shared key?
As the user. Each user connects their own CometAPI access token once, and Scalekit sends it with every call. Audit logs attribute every generation and task to that user, not a shared service account.
Where is the CometAPI access token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new access token. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in CometAPI?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the chat and status tools without cometapi_kling_text_to_video or cometapi_suno_music_generate, which start paid generation tasks. Scalekit also enforces scope checks before every API call.
What happens when a user revokes CometAPI access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
How does the agent follow a long video or music task?
Start tools such as cometapi_kling_text_to_video return a task id, and the matching get tool reports status and the result when ready, for example cometapi_kling_task_get or cometapi_suno_task_get. cometapi_api_key_usage_get shows the key's quota and usage.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""cometapi"": {
""url"": ""https://mcp.scalekit.com/cometapi"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.cometapi]
url = ""https://mcp.scalekit.com/cometapi""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""cometapi"": {
""url"": ""https://mcp.scalekit.com/cometapi"",
""type"": ""http""
}
}
}