Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Huggingbay Xyz Models API
x-refined-note:
- x-agent-quickstart differs across the merged source definitions and was not carried
- x-changelog differs across the merged source definitions and was not carried
version: '1.0'
description: 'Operations tagged Models across 2 of this provider''s published API definitions: huggingbay-xyz-openapi.json, huggingbay-xyz-run-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://huggingbay.xyz
- url: https://run.huggingbay.xyz
tags:
- name: Models
paths:
/api/returning-users/notices:
get:
operationId: getReturningModelNotices
tags:
- Models
security: []
summary: Read published model notices
description: 'Reads the curated notice file. An empty list makes no model-improvement claim. Requires HB_RETURNING_USERS=1; disabled by default.
**Inputs.** No path or query fields are required. No request body is required.
**Outputs.** See each status below for its media type, schema and headers. A missing record or unavailable capability is not a successful empty result.
**Errors.** API JSON failures use the documented response schema. Read code, message and next; retry only when the response allows it. Auth, invalid input and missing records need a caller change.
**Rate limits.** Public read budgets apply by client IP and route group. This operation can have a smaller route-specific budget. Read Retry-After on 429 or retryable 503 responses.'
x-feature-flag: HB_RETURNING_USERS
x-default-enabled: false
responses:
'200':
description: Published notices
content:
application/json:
schema:
type: object
required:
- schema
- notices
properties:
schema:
const: 1
notices:
type: array
maxItems: 100
items:
type: object
additionalProperties: true
note:
anyOf:
- type: string
- type: object
required:
- summary
properties:
summary:
type: string
downloadable:
type: boolean
additionalProperties: false
noteMessage:
type: string
description: Original route note, when a public qualification occupies note.
additionalProperties: false
headers:
X-HB-Backoff:
description: Optional v1 backoff contract marker; rollout defaults off.
schema:
type: string
X-HB-Admission:
description: Optional open, busy or limited; a process-local observation, not a reservation.
schema:
type: string
X-HB-Capacity:
description: Optional process-local heavy/bytes active, limit and remaining counts plus observed epoch seconds. Cached observations may be old.
schema:
type: string
'404':
description: Feature disabled
content:
application/json:
schema:
type: object
additionalProperties: true
headers:
X-HB-Backoff:
description: Optional v1 backoff contract marker; rollout defaults off.
schema:
type: string
X-HB-Admission:
description: Optional open, busy or limited; a process-local observation, not a reservation.
schema:
type: string
X-HB-Capacity:
description: Optional process-local heavy/bytes active, limit and remaining counts plus observed epoch seconds. Cached observations may be old.
schema:
type: string
'429':
description: Too many requests in the current window. Wait for Retry-After, then retry.
headers:
Retry-After:
schema:
type: integer
minimum: 1
description: Seconds to wait before retrying.
RateLimit-Limit:
schema:
type: integer
description: Configured limit for this route group (see x-rate-limit).
RateLimit-Remaining:
schema:
type: integer
minimum: 0
description: Remaining requests in the current window on uncached responses.
RateLimit-Reset:
schema:
type: integer
description: Seconds until the current request window resets.
X-HB-Backoff:
description: Optional v1 backoff contract marker; rollout defaults off.
schema:
type: string
X-HB-Admission:
description: Optional open, busy or limited; a process-local observation, not a reservation.
schema:
type: string
X-HB-Capacity:
description: Optional process-local heavy/bytes active, limit and remaining counts plus observed epoch seconds. Cached observations may be old.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'503':
description: Authority read failed closed or capacity was saturated; wait and retry.
headers:
Retry-After:
schema:
type: integer
minimum: 1
X-HB-Backoff:
description: Optional v1 backoff contract marker; rollout defaults off.
schema:
type: string
X-HB-Admission:
description: Optional open, busy or limited; a process-local observation, not a reservation.
schema:
type: string
X-HB-Capacity:
description: Optional process-local heavy/bytes active, limit and remaining counts plus observed epoch seconds. Cached observations may be old.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
x-request-example:
method: GET
url: https://huggingbay.xyz/api/returning-users/notices
headers: {}
parameters: []
prerequisites: []
verification: Request template. Not a captured live response.
curl: curl -sS 'https://huggingbay.xyz/api/returning-users/notices'
x-codeSamples:
- lang: Shell
label: curl request
source: curl -sS 'https://huggingbay.xyz/api/returning-users/notices'
x-rate-limit:
policy: '#/x-rate-limit'
summary: Public read budgets apply by client IP and route group. This operation can have a smaller route-specific budget. Read Retry-After on 429 or retryable 503 responses.
x-error-contract:
note: API JSON failures use the documented response schema. Read code, message and next; retry only when the response allows it. Auth, invalid input and missing records need a caller change.
responses:
'404':
description: Feature disabled
mediaTypes:
- application/json
schemas:
application/json:
type: object
additionalProperties: true
'429':
description: Too many requests in the current window. Wait for Retry-After, then retry.
mediaTypes:
- application/json
schemas:
application/json:
$ref: '#/components/schemas/ErrorEnvelope'
'503':
description: Authority read failed closed or capacity was saturated; wait and retry.
mediaTypes:
- application/json
schemas:
application/json:
$ref: '#/components/schemas/ErrorEnvelope'
servers:
- url: https://huggingbay.xyz
/v1/models:
x-bay-run-visibility: internal/advanced
get:
summary: List Models
operationId: list_models_v1_models_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'403':
description: Required owner-management or agent-spend credential is missing
security:
- BearerAuth: []
- DeveloperApiKey: []
x-bay-run-developer-api-key-scopes:
- models:read
x-bay-run-visibility: internal/advanced
tags:
- Models
servers:
- url: https://run.huggingbay.xyz
components:
schemas:
ErrorEnvelope:
type: object
description: 'General API JSON errors, HTTP 410 Gone tombstones, MCP JSON-RPC error.data, and MCP tools/call failures (`result.isError:true` structuredContent) use this envelope; notification confirmation/unsubscribe errors have separate shapes, and paused subscribe/lookup responses use next:null. Fields: `code` (stable snake_case), `message` (plain words: what happened), `next` ({ label, action, command, href }: the single next step — `command` is a literal runnable shell line), `request_id`, and `retry_after_s` in the body on retryable 429 and 503 errors (not on 410). `error`, `status`, `requestId`, `retryAfterSeconds`, `cause` and `hint` are additive legacy twins kept for older clients. `nextAction` and `docsRef` are DEPRECATED aliases that only the /api/agents/* and /api/recommend-specialist lanes still emit; read `next` instead.'
required:
- code
- message
- next
- request_id
properties:
code:
type: string
description: Stable machine-readable error code (see x-error-taxonomy).
message:
type: string
description: What happened, in plain words.
next:
type: object
required:
- label
- action
- command
- href
description: The single next step. `label` is plain words; `action` is one of retry | fix_identifier | get_key | wait | contact; `command` is a literal runnable shell line (no editing required); `href` is the docs or recovery URL. `step` is the finer-grained legacy recovery verb.
properties:
label:
type: string
action:
type: string
enum:
- retry
- fix_identifier
- get_key
- wait
- contact
command:
type: string
href:
type: string
step:
type: string
enum:
- search_catalog
- fix_identifier
- list_tasks
- fix_query
- fix_hardware_param
- fix_request
- fix_arguments
- authenticate
- use_authorized_credential
- use_allowed_method
- retry_after
- retry_later
- read_body_then_retry
- reduce_request_size
- read_api_index
- list_tools
- request_mirror
- open_finder
- read_docs
- relax_constraints
retryAfterSeconds:
type: integer
minimum: 1
dropped:
type: string
additionalProperties: true
request_id:
type:
- string
- 'null'
description: req_… — quote it when you report a problem. Same id as the X-Request-Id header (prefixed).
retry_after_s:
type: integer
minimum: 1
description: 'Present on retryable 429 and 503 errors: wait this many seconds, then retry. Mirrors the Retry-After header for header-blind clients.'
error:
type: string
deprecated: true
description: DEPRECATED legacy twin of `code`; read `code`. Kept for one release.
status:
anyOf:
- type: integer
minimum: 400
maximum: 599
- enum:
- identity-unavailable
- unavailable
- not-served
requestId:
type:
- string
- 'null'
deprecated: true
description: DEPRECATED legacy twin of `request_id` (unprefixed); read `request_id`. Kept for one release.
retryable:
type: boolean
retryAfterSeconds:
type: integer
minimum: 1
deprecated: true
description: DEPRECATED legacy twin of `retry_after_s`; read `retry_after_s`. Kept for one release.
hint:
type: string
cause:
type: string
reason_code:
type: string
description: The lane-specific code a guided code (file_withheld, ...) replaced.
field:
type: string
allowed: {}
nextAction:
type: object
deprecated: true
description: 'DEPRECATED alias of `next`: { method, endpoint }. Read `next.href` instead.'
docsRef:
type: string
deprecated: true
description: DEPRECATED alias of `next.href` pointing at the OpenAPI operation.
additionalProperties: true
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Hugging Bay bearer token for account, publisher, or authorized operator endpoints. Public discovery endpoints do not require a token. Get a reader token self-serve (no prior auth, no signup): POST /api/account/reader-token, then send it as Authorization: Bearer <token>. Full walkthrough at /quickstart#get-a-key.'
BearerAuth:
type: http
scheme: bearer
bearerFormat: OAuth access token, bay_live_ durable free key, or configured bearer
description: Bay Run OAuth access token, email-free revocable bay_live_ demo key, or configured operator/demo bearer.
DeveloperApiKey:
type: http
scheme: bearer
bearerFormat: bayr1.<credential_id>.<one-time-secret>
description: OAuth-owned, revocable developer key. The raw secret is shown only on create/rotate and stored solely as a dedicated-pepper HMAC digest. Owner-management scopes require operator-attested enrollment; public OAuth alone cannot issue them. billing:write controls checkout, policy, and approval. billing:spend is the separate agent-spend authority and must be paired with inference:invoke. Keep OAuth and billing:write keys out of agent harnesses.
OperatorBearer:
type: http
scheme: bearer
description: Platform operator secret accepted only on explicitly documented owner-management operations. It is not an OAuth access token and must never be placed in an agent harness.
x-refined-from:
- huggingbay-xyz-openapi.json
- huggingbay-xyz-run-openapi.json
x-hugging-bay-route-recovery:
/api/search:
requestedPath: /api/search
method: GET
behavior: internal_alias
aliasOf: /api/artifacts
url: https://huggingbay.xyz/api/search?q=<query>&limit=20
canonicalUrl: https://huggingbay.xyz/api/artifacts?summary=1&q=<query>&limit=20
responseSchema: ArtifactPage
defaults:
summary: '1'
limit: 20
note: Returns bounded public artifact summaries; it never exposes private rows.
/api/finder:
requestedPath: /api/finder
method: GET
behavior: internal_alias
aliasOf: /api/agents/find-model
url: https://huggingbay.xyz/api/finder?task=<task>&limit=3
canonicalUrl: https://huggingbay.xyz/api/agents/find-model?task=<task>&limit=3
responseSchema: FindModelResponse
note: Uses the bounded task-and-constraints finder; provide task (or q) before acting on a candidate.
/api/downloads/{artifactId}:
requestedPath: /api/downloads/{artifactId}
method: GET
behavior: internal_alias
aliasOf: /api/artifacts/{artifactId}/download-plan
url: https://huggingbay.xyz/api/downloads/{artifactId}
canonicalUrl: https://huggingbay.xyz/api/artifacts/{artifactId}/download-plan
responseSchema: ArtifactDownloadPlan
servesBytes: false
nextRequest:
method: GET
url: https://huggingbay.xyz/api/downloads/{artifactId}/{path}
note: Use an exact hosted file path returned by the plan; never infer a filename or availability.
x-agent-reads:
summary: User fetchers and OAI-SearchBot may read find, plan and search APIs. Bulk crawlers use public metadata. Private/export/byte routes stay excluded. Authentication, byte guards and rate limits apply.
userFetchers:
- ChatGPT-User
- Claude-User
- Perplexity-User
- Google-Agent
- Google-GeminiNotebook
- MistralAI-User
searchCrawlers:
- OAI-SearchBot
readEndpoints:
- https://huggingbay.xyz/api/agents/find-model
- https://huggingbay.xyz/api/agents/find-runnable
- https://huggingbay.xyz/api/agents/deployment-plan
- https://huggingbay.xyz/api/v1/search
- https://huggingbay.xyz/api/search
- https://huggingbay.xyz/api/search/semantic
robots: https://huggingbay.xyz/robots.txt
authorization: A user-agent string is not authentication or proof of user consent.
x-data-freshness:
degraded: The current read could not supply a complete fresh response. Any included rows are a fallback or partial view; an empty degraded response does not establish that no records exist.
stale: Included data comes from an earlier snapshot, rather than a fresh check. Read asOf, snapshotAt, generatedAt or the endpoint's documented refresh timestamp when present; do not assume generatedAt alone is the time the underlying data was checked.
acquisition: These flags describe data freshness, not permission to download or execute. Download links still depend on the live file checks.
x-private-routes:
scope: Private browser and email-provider integration; these routes are not public SDK operations and do not require a reader token. Browser JSON POSTs enforce the configured same-origin policy.
paused: Subscribe and lookup return 503 notify_paused with retryable:false, next:null and no Retry-After or retry_after_s. Do not automatically retry. Transient notify_unavailable responses carry retry_after_s and Retry-After.
routes:
- path: /v1/notify/subscribe
methods:
- POST
description: Same-origin JSON email/topic submission. Success is 200 with pending or confirmed state; no email-send claim while paused.
private: true
- path: /v1/notify/lookup
methods:
- POST
description: Same-origin JSON lookup for the typed email/topic; 200 returns onList, topic and status. Stores nothing.
private: true
- path: /v1/notify/confirm
methods:
- POST
description: Same-origin JSON body containing a signed confirmation token; GET is not supported. Confirmation errors use their own code-only shape.
private: true
- path: /v1/notify/unsubscribe
methods:
- POST
description: Same-origin JSON body containing a signed unsubscribe token. A configured signed unsubscribe can work while subscriptions are paused; errors use their own code-only shape.
private: true
- path: /v1/notify/unsubscribe/{token}
methods:
- GET
- HEAD
- POST
description: Email one-click integration. GET/HEAD redirect to the confirmation page without removing anyone; POST accepts the provider's one-click form body and a signed token.
private: true
x-rate-limit:
authRequired: false
publicReadsPerWindow: 300
crawlerReadsPerWindow: 1200
windowSeconds: 60
scope: per client IP and route group; bearer tokens share the IP budget
onExceeded: HTTP 429 rate_limited with a Retry-After header; the body is the standard ErrorEnvelope with retry_after_s (always in the body on 429/503) and next.action=wait.
headers: RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds) appear on uncached responses; public cacheable reads omit them to avoid sharing one client's budget.
note: Public discovery (search, resolve, artifact reads, download-plan, find-model, MCP tools/list and tools/call) needs no token. A self-serve reader token (POST /api/account/reader-token) is only for account workflows and is rate-limited the same way.
backoff:
version: hugging-bay.backoff.v1
signals:
- 429 rate_limited
- 429 public_read_capacity_reserved
- 503 admission
retry: GET/HEAD only; at most two retries; wait the largest valid Retry-After (seconds or HTTP-date) or JSON retry_after_s/retryAfterSeconds, plus positive jitter. Stop rather than shorten a delay beyond the local wait budget. Never automatically replay a write.
success: X-HB-Admission and X-HB-Capacity are process-local, timestamped observations, not reservations. Shared caches may replay them. A success with Retry-After is consumed once; pace the next read, never retry the success.
headersEnabled: true
budgetEndpoint: /api/v1/budget
perTokenApiBudgetEnabled: false
admission:
enabled: true
heavyReadConcurrency: 6
byteReadConcurrency: 4
perClientReadConcurrency: 2
waitMs: 3000
retryAfterSeconds: 1
summary: 'Public reads: 300 requests per 60s per client IP and route group; designated crawlers get 1200. Bearer API traffic shares the client IP budget on this instance. GET /api/v1/budget reports limit, remaining, windowSeconds and reset for your token (when per-token budgets are active) or client IP without consuming a unit. Over limit: HTTP 429 rate_limited; wait for Retry-After (retry_after_s in JSON). RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset appear on uncached responses and are omitted on public cacheable reads. Shared database capacity also limits heavy reads to 6 at once, byte reads to 4, and each identified client to 2. Admission waits up to 3000ms, then returns 429 public_read_capacity_reserved for bulk agents/crawlers or 503 admission for other clients with Retry-After: 1. This is a concurrency limit, not a requests-per-second quota. One backoff contract covers 429 rate_limited, 429 public_read_capacity_reserved and 503 admission: wait the largest Retry-After (seconds or HTTP-date) / retry_after_s / retryAfterSeconds plus positive jitter, use at most two read retries, and stop rather than shorten a delay beyond your wait budget. Never automatically replay writes. When enabled, X-HB-Backoff: v1, X-HB-Admission (open/busy/limited) and timestamped X-HB-Capacity appear on successes too; these are process-local observations which caches may replay, not reservations. Consume a success once; Retry-After paces the next read. Bay Run limits are separate.'
bayRun: 'Bay Run (run.huggingbay.xyz) is a separate service with separate limits: the free key allows a fixed number of tasks a day per key, and its own 429s carry retry_after_s in the same JSON shape. See the Bay Run section of llms.txt.'
x-error-taxonomy:
envelope: '#/components/schemas/ErrorEnvelope'
shape: 'code · message · next{label,action,command,href} · request_id · retry_after_s (C18-K3 / L-M2). One shape on every surface: REST, MCP JSON-RPC error.data, and the Bay Run-facing docs here.'
nextActions:
- retry
- fix_identifier
- get_key
- wait
- contact
retryAfter: retry_after_s is in the BODY on every 429 and 503 (header-blind clients), mirrored by the Retry-After header.
codes:
- code: invalid_query
status: 400
nextAction: retry
nextStep: fix_query
meaning: A query parameter is missing, malformed, or outside its documented enum or numeric range. Carries field and (for enums) allowed. Rejected at the edge before the database.
- code: missing_task
status: 400
nextAction: retry
nextStep: list_tasks
meaning: A task-first endpoint (find-model, find-runnable, recommend-specialist) was called without the required task parameter.
- code: authentication_required
status: 401
nextAction: get_key
nextStep: authenticate
meaning: The route needs a bearer token. Mint one self-serve at POST /api/account/reader-token; next.command is that exact call.
- code: forbidden
status: 403
nextAction: get_key
nextStep: use_authorized_credential
meaning: The caller holds no credential authorized for this route. Carries the required role list.
- code: unknown_route
status: 404
nextAction: retry
meaning: No such API route (any case). Route names are lowercase; next.command is a working search call.
- code: artifact_not_found
status: 404
nextAction: fix_identifier
nextStep: search_catalog
meaning: No public artifact has that id (anonymous caller). next.command searches the catalog for it.
- code: request_not_found
status: 404
nextAction: retry
nextStep: fix_request
meaning: No agent request matches this id, or the id does not have the documented req_ plus 24 hexadecimal characters shape. The route exists; this is not unknown_route.
- code: not_found
status: 404
nextAction: fix_identifier
meaning: No public record matches the identifier (non-artifact records). For anonymous callers this replaces the older conflated not_found_or_not_authorized.
- code: resource_gone
status: 410
nextAction: fix_identifier
meaning: The route or record was permanently removed or superseded. Do not retry the same identifier; read next for the documented replacement or search path.
- code: endorsement_badges_removed
status: 410
nextAction: retry
nextStep: read_docs
meaning: Publisher and artifact endorsement badges were retired permanently. Read the trust methodology for what Hugging Bay still verifies.
- code: file_withheld
status: 404
nextAction: retry
meaning: The file lane refused bytes because the live file admission or artifact obtain verdict withheld them (410 for withdrawn bytes or reason_code artifact_obtain_not_ready). Files withheld — not faked; next.command reads the download-plan, whose serveExplanation says why. Artifact-verdict denials include downloadable, downloadStatus, reasonCodes, reason, serveEvaluatedAt and serveEvaluationId. reason_code carries the lane code.
- code: keys_moved
status: 404
nextAction: get_key
meaning: '/api/v1/keys was retired. Keys for this site are reader tokens: next.command is the one POST to /api/account/reader-token.'
- code: rate_limited
status: 429
nextAction: wait
nextStep: retry_after
meaning: Too many requests in the current window. Wait retry_after_s seconds (also in Retry-After), then retry. See x-rate-limit.
- code: service_unavailable
status: 503
nextAction: wait
nextStep: retry_later
meaning: A bounded authority read failed closed or capacity was saturated. The document is never fabricated; wait retry_after_s seconds (always in the body), then retry.
x-deprecated-aliases:
policy: Legacy /api/* aliases still answer for older SDK versions but send Deprecation and Sunset response headers plus a Link rel=successor-version to the recorded path. Prefer the recorded path.
aliases:
- alias: /api/search
primary: /api/v1/search
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/artifacts
primary: /api/v1/search
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/resolve
primary: /api/v1/resolve
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/trending
primary: /api/v1/trending
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/compare
primary: /api/v1/compare
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/finder
primary: /api/agents/find-model
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/recommend
primary: /api/recommender
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
- alias: /api/manifests/{id}
primary: /api/v1/artifacts/{id}/manifest
status: deprecated
served: still answers, with Deprecation and Sunset response headers and a Link rel=successor-version pointing at the recorded path
# --- truncated at 32 KB (41 KB total) ---
# Full source: https://artifacts.apis.io/huggingbay-xyz/openapi/huggingbay-xyz-models-api-openapi.yml