Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/hud-ai:hud-ai-usage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: HUD Platform Usage API
version: 2.0.0
tags:
- name: Usage
paths:
/v2/environments/usage:
get:
tags:
- Usage
summary: Get Environment Usage
description: Get the team's environment session usage over a window, with summary and paged sessions.
operationId: get_environment_usage_v2_environments_usage_get
parameters:
- name: days
in: query
required: false
schema:
type: integer
maximum: 365
minimum: 1
default: 7
title: Days
- name: user_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
- name: api_key_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Api Key Id
- name: status
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Status
- name: limit
in: query
required: false
schema:
type: integer
maximum: 200
minimum: 1
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
maximum: 2147483647
minimum: 0
default: 0
title: Offset
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/EnvironmentUsageResponse'
'400':
description: Invalid or malformed request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Caller may not access this resource
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Referenced entity does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Resource already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Rate limit exceeded; wait at least Retry-After seconds
headers:
Retry-After:
description: Seconds until the request budget has room
schema:
type: integer
minimum: 0
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: The server is at capacity; retry after Retry-After seconds
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
minimum: 0
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v2/usage/inference:
get:
tags:
- Usage
summary: Get Inference Usage Aggregate
description: Aggregate the team's inference usage into time buckets, optionally grouped.
operationId: get_inference_usage_aggregate_v2_usage_inference_get
parameters:
- name: start
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Window start; defaults to end-7d
title: Start
description: Window start; defaults to end-7d
- name: end
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Window end; defaults to now
title: End
description: Window end; defaults to now
- name: bucket_width
in: query
required: false
schema:
enum:
- 1h
- 1d
type: string
default: 1d
title: Bucket Width
- name: group_by
in: query
required: false
schema:
anyOf:
- type: array
items:
enum:
- api_key
- byok
- model
- user
- route
type: string
- type: 'null'
description: Grouping dimensions; repeat the parameter to group by several at once
title: Group By
description: Grouping dimensions; repeat the parameter to group by several at once
- name: user_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
- name: api_key_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Api Key Id
- name: byok_credential_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Byok Credential Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/InferenceUsageAggregateResponse'
'400':
description: Invalid or malformed request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Missing or invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Caller may not access this resource
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Referenced entity does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Resource already exists
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Rate limit exceeded; wait at least Retry-After seconds
headers:
Retry-After:
description: Seconds until the request budget has room
schema:
type: integer
minimum: 0
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: The server is at capacity; retry after Retry-After seconds
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
minimum: 0
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
EnvironmentUsageRow:
properties:
id:
type: string
format: uuid
title: Id
created_at:
type: string
format: date-time
title: Created At
terminated_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Terminated At
status:
type: string
title: Status
hourly_rate:
anyOf:
- type: number
- type: 'null'
title: Hourly Rate
user_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
user_name:
anyOf:
- type: string
- type: 'null'
title: User Name
api_key_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Api Key Id
api_key_name:
anyOf:
- type: string
- type: 'null'
title: Api Key Name
duration_hours:
type: number
title: Duration Hours
default: 0.0
cost:
type: number
title: Cost
default: 0.0
type: object
required:
- id
- created_at
- status
title: EnvironmentUsageRow
InferenceUsageGroup:
properties:
api_key_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Api Key Id
api_key_name:
anyOf:
- type: string
- type: 'null'
title: Api Key Name
api_key_is_default:
type: boolean
title: Api Key Is Default
default: false
api_key_owner:
anyOf:
- type: string
- type: 'null'
title: Api Key Owner
byok:
type: boolean
title: Byok
default: false
byok_credential_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Byok Credential Id
byok_name:
anyOf:
- type: string
- type: 'null'
title: Byok Name
byok_scope:
anyOf:
- type: string
enum:
- member
- team
- type: 'null'
title: Byok Scope
byok_owner:
anyOf:
- type: string
- type: 'null'
title: Byok Owner
model:
anyOf:
- type: string
- type: 'null'
title: Model
qa_analysis:
type: boolean
title: Qa Analysis
default: false
user_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
user_name:
anyOf:
- type: string
- type: 'null'
title: User Name
route:
anyOf:
- type: string
- type: 'null'
title: Route
requests:
type: integer
title: Requests
input_tokens:
type: integer
title: Input Tokens
output_tokens:
type: integer
title: Output Tokens
cached_input_tokens:
type: integer
title: Cached Input Tokens
cost:
type: number
title: Cost
type: object
required:
- requests
- input_tokens
- output_tokens
- cached_input_tokens
- cost
title: InferenceUsageGroup
description: 'One group within a bucket.
The dimension fields matching the requested ``group_by`` dimensions are
set; all are None for ungrouped queries. ``api_key_id``/``user_id`` may be
set with a None name (deleted user, key created before attribution); a
None ``api_key_id`` group under ``group_by=api_key`` collects
Clerk-session (non-key) usage. Under ``group_by=model``, QA analysis
inference forms one ``qa_analysis`` group whose ``model`` is the HUD QA
label rather than the model it ran on.'
ErrorResponse:
properties:
error:
type: string
title: Error
source:
$ref: '#/components/schemas/ErrorSource'
detail:
type: string
title: Detail
type: object
required:
- error
- source
- detail
title: ErrorResponse
description: The uniform `{error, source, detail}` envelope returned for every 4xx/5xx.
EnvironmentUsageSummary:
properties:
total_hours:
type: number
title: Total Hours
default: 0.0
total_cost:
type: number
title: Total Cost
default: 0.0
active_count:
type: integer
title: Active Count
default: 0
total_count:
type: integer
title: Total Count
default: 0
type: object
title: EnvironmentUsageSummary
ErrorSource:
type: string
enum:
- user
- platform
- provider
title: ErrorSource
description: 'Who is at fault for a failure.
``user``: the customer''s input, account, environment, or agent code.
``platform``: HUD infrastructure or a broken platform invariant.
``provider``: a third-party dependency (cloud runtime, upstream LLM API).'
EnvironmentUsageResponse:
properties:
summary:
$ref: '#/components/schemas/EnvironmentUsageSummary'
chart:
items:
$ref: '#/components/schemas/EnvironmentUsageChartPoint'
type: array
title: Chart
environments:
items:
$ref: '#/components/schemas/EnvironmentUsageRow'
type: array
title: Environments
team_id:
type: string
format: uuid
title: Team Id
type: object
required:
- summary
- chart
- environments
- team_id
title: EnvironmentUsageResponse
InferenceUsageAggregateResponse:
properties:
start:
type: string
format: date-time
title: Start
end:
type: string
format: date-time
title: End
bucket_width:
type: string
enum:
- 1h
- 1d
title: Bucket Width
group_by:
items:
type: string
enum:
- api_key
- byok
- model
- user
- route
type: array
title: Group By
total_requests:
type: integer
title: Total Requests
total_cost:
type: number
title: Total Cost
buckets:
items:
$ref: '#/components/schemas/InferenceUsageBucket'
type: array
title: Buckets
type: object
required:
- start
- end
- bucket_width
- total_requests
- total_cost
- buckets
title: InferenceUsageAggregateResponse
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
error:
type: string
const: validation_error
title: Error
source:
type: string
enum:
- user
- platform
- provider
title: Source
detail:
type: string
title: Detail
errors:
type: array
items:
$ref: '#/components/schemas/ValidationError'
title: Errors
required:
- error
- source
- detail
- errors
ValidationError:
title: ValidationError
type: object
properties:
type:
type: string
title: Error Type
loc:
type: array
items:
anyOf:
- type: string
- type: integer
title: Location
msg:
type: string
title: Message
required:
- type
- loc
- msg
InferenceUsageBucket:
properties:
start:
type: string
format: date-time
title: Start
groups:
items:
$ref: '#/components/schemas/InferenceUsageGroup'
type: array
title: Groups
type: object
required:
- start
- groups
title: InferenceUsageBucket
EnvironmentUsageChartPoint:
properties:
date:
type: string
title: Date
hours:
type: number
title: Hours
default: 0.0
cost:
type: number
title: Cost
default: 0.0
count:
type: integer
title: Count
default: 0
type: object
required:
- date
title: EnvironmentUsageChartPoint
x-hud-contract-scope: platform_public