API Stock

운영

Generate images in Claude Code with API Stock

Add API Stock media tools to Claude Code, check access and create a landing-page illustration with a request spending ceiling.

2분 분량5개 섹션

Claude Code

claude mcp add --transport http api-stock https://api.api-stock.com/mcp

터미널에서 이 명령을 실행한 다음 Claude Code에서 /mcp를 입력하고 로그인하세요.

Give Claude Code a page-building task that includes an original image. API Stock's MCP server lets it inspect models, quote a generation and retrieve the finished media. Claude Code keeps using your selected coding model.

Connect the media tools

Run the command above from the project where you want the connection. Inside Claude Code, open /mcp, select api-stock and authenticate. Sign in to API Stock in the browser and review the requested permissions. The connection uses OAuth; keep account credentials out of project files.

You can alternatively install the existing Claude Code plugin:

text
/plugin marketplace add APIStock/api-stock-mcp
/plugin install api-stock@api-stock

Use either setup method. Adding both creates duplicate connections.

Check access without generating media

text
Use the API Stock MCP tools to call get_account and list_models.
Show my balance and three image models. Do not create a generation.

Discovery can list tool schemas before sign-in. Actual tool calls need authentication. Seeing the server name in /mcp does not prove that generation permissions or sufficient balance are available.

Create a hero image and use it in a page

Copy the landing-page brief. The workflow inspects a model, quotes the exact input, waits for spending approval and retrieves the finished task. Claude Code then uses its local file tools to place the image in the project.

Use the approved quote as maxCostUsd. Generate an idempotencyKey once for this logical task and reuse it if the connection drops after submission. A new key may create another billable task. Stopping Claude Code does not cancel an accepted generation.

For a reference image, call create_upload_url, upload the file with HTTP PUT and use the returned publicUrl in the model input. The upload and download require HTTP-capable local tools; MCP alone does not write your project files.

Review the result

Require a finished task, an actual local image and an evidence record with the model and task id. Inspect the page before publishing it. A request quote is an estimate; report a charged amount only when it was observed.

Revoke the connection in Dashboard → Connectors. For a second task, try the app asset brief or inspect video models.

Troubleshooting

SymptomNext step
Tools are missingCheck /mcp, authenticate and start a new session.
A tool returns unauthorizedRepeat browser sign-in and review consent.
Creation is refusedCheck balance, generation permission, model input and the spending ceiling.
A task is still processingKeep its id and poll it; avoid creating a replacement task.

Setup follows Claude Code's MCP documentation. Protocol checks and connection setup are separate from a paid end-to-end generation. The MCP reference describes each tool and its permissions.

직접 발급한 키로 실행해 보세요

API Stock 카탈로그에서 모델과 가격을 확인하고 브라우저나 API로 사용해 보세요.

이어서 읽기