{"openapi":"3.1.0","info":{"title":"Zhipu AI (BYOK) API","version":"0.1.0","description":"Zhipu AI (BYOK) lets an AI assistant read your own Zhipu AI data through the Zhipu AI API with a key you supply (Zhipu Open Platform API key). Read-only: 12 tools (list_files, list_batches, get_batch, list_agents, get_agent, list_environments, list_sessions, get_session, list_deployments, get_deployment, list_deployment_runs, list_memory_stores). The BYOK key travels with each request, is used...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-zhipu.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-zhipu/docs"},"termsOfService":"https://connectorbay.com/byok-zhipu/terms"},"servers":[{"url":"https://byok-zhipu.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-zhipu/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_files":{"post":{"operationId":"list_files","summary":"List uploaded files for one purpose (batch, code-interpreter or agent) with name, size and creation time (Unix seconds).","description":"List uploaded files for one purpose (batch, code-interpreter or agent) with name, size and creation time (Unix seconds). Contents are not returned. Use for \"Which batch input files have I uploaded to Zhipu\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"purpose":{"description":"File purpose to list.","enum":["batch","code-interpreter","agent"],"title":"Purpose","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Files per page (1 to 100).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Id of the last file of the previous page.","title":"After"}},"required":["purpose"],"title":"list_filesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_batches":{"post":{"operationId":"list_batches","summary":"List batch jobs with status, input and output file ids, timestamps (Unix seconds) and request counts. When has_more is t","description":"List batch jobs with status, input and output file ids, timestamps (Unix seconds) and request counts. When has_more is true pass last_id as after. Use for \"Which Zhipu batch jobs have I run and what is their status\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Batches per page (default 20).","title":"Limit"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Id of the last batch of the previous page.","title":"After"}},"title":"list_batchesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_batch":{"post":{"operationId":"get_batch","summary":"Get one batch job: status, input, output and error file ids, timestamps (Unix seconds) and request counts. Use for \"How ","description":"Get one batch job: status, input, output and error file ids, timestamps (Unix seconds) and request counts. Use for \"How far along is Zhipu batch batch_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"Batch id from list_batches.","maxLength":200,"title":"Batch Id","type":"string"}},"required":["batch_id"],"title":"get_batchArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_agents":{"post":{"operationId":"list_agents","summary":"List managed agents (beta) with name, description, model, version and timestamps. Archived agents are excluded by defaul","description":"List managed agents (beta) with name, description, model, version and timestamps. Archived agents are excluded by default. System prompts and tool settings are not returned. Use for \"Which managed agents do I have on Zhipu\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (default 20; the server caps it at 100).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction by creation time.","title":"Order"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_agentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_agent":{"post":{"operationId":"get_agent","summary":"Get one managed agent: name, description, model, current version and timestamps. Use for \"Show Zhipu agent agent_abc123\"","description":"Get one managed agent: name, description, model, current version and timestamps. Use for \"Show Zhipu agent agent_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"agent_id":{"description":"Agent id from list_agents.","maxLength":200,"title":"Agent Id","type":"string"}},"required":["agent_id"],"title":"get_agentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_environments":{"post":{"operationId":"list_environments","summary":"List managed-agent cloud environments with name, description, state (active or archived) and timestamps. Use for \"Which ","description":"List managed-agent cloud environments with name, description, state (active or archived) and timestamps. Use for \"Which agent environments exist in my Zhipu account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (default 20; the server caps it at 100).","title":"Limit"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_environmentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sessions":{"post":{"operationId":"list_sessions","summary":"List managed-agent sessions, newest first by default, with status, title, agent, token usage and duration. Filter by age","description":"List managed-agent sessions, newest first by default, with status, title, agent, token usage and duration. Filter by agent id or creation time. Use for \"What agent sessions ran recently on Zhipu and how many tokens did they use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"agent_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions of this agent id.","title":"Agent Id"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived sessions.","title":"Include Archived"},"created_after":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions created at or after this RFC 3339 time.","title":"Created After"},"created_before":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only sessions created at or before this RFC 3339 time.","title":"Created Before"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (default 20; the server caps it at 100).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction by creation time.","title":"Order"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_sessionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_session":{"post":{"operationId":"get_session","summary":"Get one managed-agent session: status (idle, running, rescheduling or terminated), title, agent, environment, duration a","description":"Get one managed-agent session: status (idle, running, rescheduling or terminated), title, agent, environment, duration and token usage. Use for \"What is the status and token usage of Zhipu session sess_abc123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"session_id":{"description":"Session id from list_sessions.","maxLength":200,"title":"Session Id","type":"string"}},"required":["session_id"],"title":"get_sessionArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_deployments":{"post":{"operationId":"list_deployments","summary":"List agent deployments (scheduled or manual runs) with name, agent, environment, status (active or paused), cron schedul","description":"List agent deployments (scheduled or manual runs) with name, agent, environment, status (active or paused), cron schedule and last run time. Use for \"Which Zhipu agent deployments are active and when did they last run\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"agent_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments of this agent id.","title":"Agent Id"},"status":{"anyOf":[{"enum":["active","paused"],"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments with this status.","title":"Status"},"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived deployments.","title":"Include Archived"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (default 20; the server caps it at 100).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction by creation time.","title":"Order"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_deploymentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_deployment":{"post":{"operationId":"get_deployment","summary":"Get one deployment: agent, environment, schedule with last and upcoming run times, status and pause reason. Use for \"Whe","description":"Get one deployment: agent, environment, schedule with last and upcoming run times, status and pause reason. Use for \"When will Zhipu deployment dep_abc123 run next\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"deployment_id":{"description":"Deployment id from list_deployments.","maxLength":200,"title":"Deployment Id","type":"string"}},"required":["deployment_id"],"title":"get_deploymentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_deployment_runs":{"post":{"operationId":"list_deployment_runs","summary":"List deployment runs with trigger type, session id, error and agent version. Filter by deployment, trigger type or wheth","description":"List deployment runs with trigger type, session id, error and agent version. Filter by deployment, trigger type or whether it failed. Use for \"Did any Zhipu deployment runs fail recently\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"deployment_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only runs of this deployment id.","title":"Deployment Id"},"has_error":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for failed runs only, false for successful runs only.","title":"Has Error"},"trigger_type":{"anyOf":[{"enum":["schedule","manual"],"type":"string"},{"type":"null"}],"default":null,"description":"Only runs with this trigger.","title":"Trigger Type"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Items per page (default 20; the server caps it at 100).","title":"Limit"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction by creation time.","title":"Order"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_deployment_runsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_memory_stores":{"post":{"operationId":"list_memory_stores","summary":"List agent memory stores with name, description and timestamps. Memory contents are not returned. Use for \"Which memory ","description":"List agent memory stores with name, description and timestamps. Memory contents are not returned. Use for \"Which memory stores do my Zhipu agents use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"include_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived stores.","title":"Include Archived"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Stores per page (1 to 100).","title":"Limit"},"page":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous page's next_page; omit for the first page.","title":"Page"}},"title":"list_memory_storesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}