POST /mcp
Use the documented request fields and permissions for this HTTP endpoint.
Request example#
curl -X POST 'https://platform.tongai.io/mcp' \ -H "Authorization: Bearer $TONG_API_KEY" \ -H "Accept: application/json, text/event-stream" \ -H "MCP-Protocol-Version: 2025-11-25" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": { "name": "your-app", "version": "1.0.0" } }}'Configuration
curl --versionAuthentication#
Use a server-side API key for your account, or OAuth for each customer’s account. Never send keys in prompts or tool arguments.
Parameters#
MCP-Protocol-VersionstringOptionalIdempotency-KeystringOptionalA UUID, for example e8aa0a87-6cd9-42eb-975a-b72bf43218c8.
Request body#
application/jsonjsonrpcJSONRequiredAllowed values
"2.0"idstring | integerOptionalmethodstringRequiredparamsobjectOptionalResponse schema#
{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-11-25", "capabilities": { "tools": {}, "resources": {} }, "serverInfo": { "name": "tong-developer-tools", "version": "0.1.0" } }}Errors and limits#
{ "jsonrpc": "2.0", "id": 2, "result": { "isError": true, "content": [ { "type": "text", "text": "{\"error\":{\"code\":\"REQUEST_INVALID\",\"message\":\"Check the request fields and try again.\",\"request_id\":\"e8aa0a87-6cd9-42eb-975a-b72bf43218c8\",\"retryable\":false},\"request_id\":\"e8aa0a87-6cd9-42eb-975a-b72bf43218c8\"}" } ] }}AuthenticationAPI keys charge the account that owns the key. OAuth lets each connected user use their own credits.Errors and rate limitsUnderstand error responses, retry safely and recover from failed generations.Requests and logsAn accepted request is not a finished generation. Track the saved job until its output is ready.