English

ModelPort MCP

Connect to ModelPort over Streamable HTTP to list models, quote media jobs, and retrieve results.

Connection

Set the MCP transport to Streamable HTTP and use https://apimodel.store/mcp. Send your API key as a Bearer token.

Connect and list image models

curl "https://apimodel.store/mcp" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"modelport-example","version":"1.0"}}}'

curl "https://apimodel.store/mcp" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  --data '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}'

curl "https://apimodel.store/mcp" \
  -H "Authorization: Bearer $MODELPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_models","arguments":{"available_only":false,"kind":"image"}}}'

From quote to result

  1. Call list_models. Set available_only:false to include unavailable models.
  2. Use quote_job with your model, prompt, and parameters.
  3. After reviewing the quote, call submit_job with max_price_usd and a unique idempotency_key.
  4. Use get_job with the returned job ID to check the status and result.

If the server returns HTTP 401, verify the Bearer token and whether the key has been revoked.