{"openapi":"3.1.0","info":{"title":"GitHub Billing (BYOK) API","version":"0.1.0","description":"GitHub Billing (BYOK) lets an AI assistant read your own GitHub Billing data through the GitHub Billing API with a key you supply (GitHub personal access token (classic, with admin:org or manage_billing:enterprise style billing access for organizations)). Read-only: 9 tools (get_org_usage_summary, get_org_usage_report, get_org_premium_request_usage, get_org_ai_credit_usage, list_org_budgets,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-github-billing.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-github-billing/docs"},"termsOfService":"https://connectorbay.com/byok-github-billing/terms"},"servers":[{"url":"https://byok-github-billing.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-github-billing/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/get_org_usage_summary":{"post":{"operationId":"get_org_usage_summary","summary":"Get an organization's billing usage summary for a period, with quantities and amounts per product and SKU. Filter by rep","description":"Get an organization's billing usage summary for a period, with quantities and amounts per product and SKU. Filter by repository, product or SKU. Use for \"How much did octo-org spend on GitHub Actions this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"repository":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this repository in owner/repository form.","title":"Repository"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"},"sku":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this SKU.","title":"Sku"}},"required":["org"],"title":"get_org_usage_summaryArguments","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_org_usage_report":{"post":{"operationId":"get_org_usage_report","summary":"Get an organization's detailed billing usage report: one row per day, product, SKU and repository with quantity and amou","description":"Get an organization's detailed billing usage report: one row per day, product, SKU and repository with quantity and amounts. Use for \"Show octo-org's daily billing usage rows for October 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"}},"required":["org"],"title":"get_org_usage_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}},"/v1/tools/get_org_premium_request_usage":{"post":{"operationId":"get_org_premium_request_usage","summary":"Get an organization's Copilot premium request usage for a period, by product, model and SKU, optionally for one user. Us","description":"Get an organization's Copilot premium request usage for a period, by product, model and SKU, optionally for one user. Use for \"How many Copilot premium requests did octo-org use this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"user":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this user login.","title":"User"},"model":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this AI model name.","title":"Model"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"}},"required":["org"],"title":"get_org_premium_request_usageArguments","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_org_ai_credit_usage":{"post":{"operationId":"get_org_ai_credit_usage","summary":"Get an organization's AI credit usage for a period, by product, model and SKU, optionally for one user. Use for \"How man","description":"Get an organization's AI credit usage for a period, by product, model and SKU, optionally for one user. Use for \"How many AI credits did octo-org consume this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"user":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this user login.","title":"User"},"model":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this AI model name.","title":"Model"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"}},"required":["org"],"title":"get_org_ai_credit_usageArguments","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_org_budgets":{"post":{"operationId":"list_org_budgets","summary":"List an organization's spending budgets with amount, consumed amount, scope, product and alert settings. Use for \"What s","description":"List an organization's spending budgets with amount, consumed amount, scope, product and alert settings. Use for \"What spending budgets does octo-org have and how much is used\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"scope":{"anyOf":[{"enum":["enterprise","organization","repository","cost_center","multi_user_customer","user"],"type":"string"},{"type":"null"}],"default":null,"description":"Only budgets of this scope.","title":"Scope"},"user":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Show consumed amounts for this user login.","title":"User"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many budgets to return (1 to 100, default 10).","title":"Per Page"},"page":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["org"],"title":"list_org_budgetsArguments","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_user_usage_summary":{"post":{"operationId":"get_user_usage_summary","summary":"Get a user account's billing usage summary for a period, with quantities and amounts per product and SKU. Use for \"How m","description":"Get a user account's billing usage summary for a period, with quantities and amounts per product and SKU. Use for \"How much GitHub usage has my personal account billed this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"GitHub user login of the account (normally the token's own login).","maxLength":200,"title":"Username","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"repository":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this repository in owner/repository form.","title":"Repository"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"},"sku":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this SKU.","title":"Sku"}},"required":["username"],"title":"get_user_usage_summaryArguments","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_user_usage_report":{"post":{"operationId":"get_user_usage_report","summary":"Get a user account's detailed billing usage report: one row per day, product, SKU and repository. Use for \"Show my perso","description":"Get a user account's detailed billing usage report: one row per day, product, SKU and repository. Use for \"Show my personal account's daily GitHub billing rows for October 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"GitHub user login of the account (normally the token's own login).","maxLength":200,"title":"Username","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"}},"required":["username"],"title":"get_user_usage_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}},"/v1/tools/get_user_premium_request_usage":{"post":{"operationId":"get_user_premium_request_usage","summary":"Get a user's Copilot premium request usage for a period, by product, model and SKU. Use for \"How many Copilot premium re","description":"Get a user's Copilot premium request usage for a period, by product, model and SKU. Use for \"How many Copilot premium requests did I use this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"GitHub user login of the account (normally the token's own login).","maxLength":200,"title":"Username","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"model":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this AI model name.","title":"Model"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"}},"required":["username"],"title":"get_user_premium_request_usageArguments","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_user_ai_credit_usage":{"post":{"operationId":"get_user_ai_credit_usage","summary":"Get a user's AI credit usage for a period, by product, model and SKU. Use for \"How many AI credits did I consume this mo","description":"Get a user's AI credit usage for a period, by product, model and SKU. Use for \"How many AI credits did I consume this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"username":{"description":"GitHub user login of the account (normally the token's own login).","maxLength":200,"title":"Username","type":"string"},"year":{"anyOf":[{"maximum":2100,"minimum":2020,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this four-digit year, for example 2026 (default: the current year).","title":"Year"},"month":{"anyOf":[{"maximum":12,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this month, 1 to 12 (default: the current month when a year is given).","title":"Month"},"day":{"anyOf":[{"maximum":31,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only this day of the month, 1 to 31.","title":"Day"},"model":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this AI model name.","title":"Model"},"product":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only usage of this product, for example Actions, Copilot, Packages or Codespaces.","title":"Product"}},"required":["username"],"title":"get_user_ai_credit_usageArguments","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}}}}