{"openapi":"3.1.0","info":{"title":"Vercel AI Gateway models, providers, credits and spend reports (your key) API","version":"0.1.0","description":"Vercel AI Gateway models, providers, credits and spend reports (your key) lets an AI assistant read your own Vercel AI Gateway data through the Vercel AI Gateway API with a key you supply (AI Gateway API key). Read-only: 5 tools (list_models, get_model_endpoints, get_credit_balance, get_generation, get_spend_report). The BYOK key travels with each request, is used for that one call only and is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-vercel-ai-gateway.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-vercel-ai-gateway/docs"},"termsOfService":"https://connectorbay.com/byok-vercel-ai-gateway/terms"},"servers":[{"url":"https://byok-vercel-ai-gateway.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-vercel-ai-gateway/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_models":{"post":{"operationId":"list_models","summary":"List every model offered through Vercel AI Gateway with type (language, embedding, image, video), context window, maximu","description":"List every model offered through Vercel AI Gateway with type (language, embedding, image, video), context window, maximum output tokens, capability tags and per-token prices (USD as text). Use for \"Which models does Vercel AI Gateway offer with vision and tool use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_modelsArguments","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_model_endpoints":{"post":{"operationId":"get_model_endpoints","summary":"List every provider endpoint that serves one model in Vercel AI Gateway with price, context length, supported parameters","description":"List every provider endpoint that serves one model in Vercel AI Gateway with price, context length, supported parameters, uptime, throughput and latency. The endpoints array is returned whole. Use for \"Which providers serve google/gemini-3.1-pro-preview on Vercel AI Gateway and how reliable are they\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"creator":{"description":"Model creator slug, for example 'google' or 'anthropic'.","maxLength":200,"title":"Creator","type":"string"},"model":{"description":"Model name without the creator, for example 'gemini-3.1-pro-preview'.","maxLength":200,"title":"Model","type":"string"}},"required":["creator","model"],"title":"get_model_endpointsArguments","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_credit_balance":{"post":{"operationId":"get_credit_balance","summary":"Show the team's remaining AI Gateway credit balance and total credits used, in USD. Use for \"How many Vercel AI Gateway ","description":"Show the team's remaining AI Gateway credit balance and total credits used, in USD. Use for \"How many Vercel AI Gateway credits do I have left\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_credit_balanceArguments","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_generation":{"post":{"operationId":"get_generation","summary":"Look up the cost, latency, token counts and provider of one past gateway generation by its id (no prompt or answer text)","description":"Look up the cost, latency, token counts and provider of one past gateway generation by its id (no prompt or answer text). Use for \"What did Vercel AI Gateway generation gen_01ARZ3NDEKTSV4RRFFQ69G5FAV cost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Generation id in the form gen_<ulid>, returned on every completion response.","maxLength":60,"title":"Id","type":"string"}},"required":["id"],"title":"get_generationArguments","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_spend_report":{"post":{"operationId":"get_spend_report","summary":"Get aggregated AI Gateway spend and token usage for a date range, grouped by day, user, model, tag, provider, credential","description":"Get aggregated AI Gateway spend and token usage for a date range, grouped by day, user, model, tag, provider, credential type or API key name. Not available on Hobby and Pro-trial plans. Use for \"How much did we spend on Vercel AI Gateway per model last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"First day, YYYY-MM-DD (UTC, inclusive).","maxLength":10,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, YYYY-MM-DD (UTC, inclusive).","maxLength":10,"title":"End Date","type":"string"},"group_by":{"anyOf":[{"enum":["day","user","model","tag","provider","credential_type","zero_data_retention","api_key_name"],"type":"string"},{"type":"null"}],"default":"day","description":"How to aggregate rows.","title":"Group By"},"model":{"anyOf":[{"maxLength":120,"type":"string"},{"type":"null"}],"default":null,"description":"Only this model, in creator/model-name form.","title":"Model"},"provider":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this provider.","title":"Provider"},"credential_type":{"anyOf":[{"enum":["byok","system"],"type":"string"},{"type":"null"}],"default":null,"description":"Only requests using this credential type.","title":"Credential Type"}},"required":["start_date","end_date"],"title":"get_spend_reportArguments","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}}}}