EggAPI/connect agent
sign in
§ connect agent

Connect your agent to EggAPI.

EggAPI is a remote MCP server. Add it to Claude Code, Codex, Cursor or any MCP client with your API key, then ask for images and video in plain language. Not using MCP? The same models are on the REST API.

◉ endpoint
mcphttps://api.eggapi.ai/mcp
transportstreamable HTTP
authAuthorization: Bearer $EGGAPI_API_KEY
rest apihttps://api.eggapi.ai/v1
§ setup

Three steps, about two minutes.

01
Create an API key

Sign in, create a key in the dashboard and add credits. Keys start with egg_ and are shown in full only once, so copy yours right away.

02
Export it

Keep the key in an environment variable instead of pasting it into config files. Add the line to ~/.zshrc or ~/.bashrc so new shells have it too.

shell
export EGGAPI_API_KEY="egg_..."
03
Add EggAPI to your agent

Pick your client below, then restart the agent from a shell where EGGAPI_API_KEY is set.

§ clients

Pick your agent.

Claude Code

terminal

Run the command once in your terminal. It adds EggAPI to the current project; add --scope user to use it in every project.

checkStart claude and type /mcp. eggapi should show as connected.

terminal
claude mcp add --transport http eggapi https://api.eggapi.ai/mcp \
  --header "Authorization: Bearer $EGGAPI_API_KEY"

Codex

~/.codex/config.toml

Add the block to ~/.codex/config.toml. Codex sends the key from EGGAPI_API_KEY, so set it in the environment Codex starts from.

checkRun codex mcp list, or type /mcp inside Codex. eggapi should be listed.

~/.codex/config.toml
[mcp_servers.eggapi]
url = "https://api.eggapi.ai/mcp"
bearer_token_env_var = "EGGAPI_API_KEY"

Cursor · MCP JSON

mcp.json

For Cursor, save it as ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project). Other clients that accept a remote MCP URL with headers use the same shape. Replace <EGGAPI_API_KEY> with your key.

checkOpen the MCP section of Cursor settings. eggapi should be enabled and list 4 tools.

mcp.json
{
  "mcpServers": {
    "eggapi": {
      "url": "https://api.eggapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer <EGGAPI_API_KEY>"
      }
    }
  }
}

REST API

curl

Plain HTTP for scripts, backends and agents without MCP. POST /v1/generate starts a task and returns its id right away. Pass webhook_url if you would rather get a callback than poll.

checkPoll GET /v1/tasks/:id until status is completed. The files are in output.urls.

curl
curl https://api.eggapi.ai/v1/generate \
  -H "Authorization: Bearer $EGGAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"bytedance/seedance-2.5/text-to-video","prompt":"a black egg cracking open, studio light","duration":5}'
GET /v1/tasks/:id
curl https://api.eggapi.ai/v1/tasks/<task_id> \
  -H "Authorization: Bearer $EGGAPI_API_KEY"
§ mcp tools

Four tools. The agent does the polling.

Generation is async: the agent starts a task, polls get_task and hands you the file URL. Images usually finish within a minute, video in 1–3 minutes.

list_models
(kind?)

List the models your key can use, with type and price, so the agent can pick within budget.

generate_image
(model, prompt, images?, aspect_ratio?, resolution?, num_outputs?)

Text-to-image, or edit with reference images.

generate_video
(model, prompt, duration, image?, aspect_ratio?, resolution?)

Text-to-video or image-to-video. Returns a task id right away.

get_task
(task_id)

Check task status and fetch the output URLs.

§ try asking

Then just ask.

❯Make a square product shot of a black ceramic mug on wet concrete with GPT Image 2.

❯Use Seedream to put the logo at https://example.com/logo.png on a plain white t-shirt.

❯Animate https://example.com/hero.png into a 5-second slow push-in with Seedance, 16:9.

§ troubleshooting

If something goes wrong.

401 Unauthorized

The key is missing or wrong. Run echo $EGGAPI_API_KEY in the shell you start the agent from, then restart the agent: it reads environment variables only at startup.

Insufficient balance

The account is out of credits. Add credits on the pricing page, then try again with the same key.

The agent does not see the tools

Check that the URL ends in /mcp and that your client supports remote HTTP MCP servers. Clients that only launch local (stdio) servers cannot connect directly.

A video stays in processing

Video usually takes 1–3 minutes. The agent keeps polling get_task; if the task fails, its error field says why.

Give your agent a camera.

Create a key, paste one command into your terminal, start generating.

connected
mcp https://api.eggapi.ai/mcp
models ...
Claude Code · Codex · MCP
█