Piloterr Huggingface API
The Huggingface API from Piloterr — 2 operation(s) for huggingface.
The Huggingface API from Piloterr — 2 operation(s) for huggingface.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/piloterr-com:piloterr-com-huggingface-api"
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.
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: 3.2.0
info:
title: Piloterr API Reference Huggingface API
description: Complete API reference documentation.
version: 1.0.0
servers:
- url: https://api.piloterr.com
description: API Server
tags:
- name: Huggingface
paths:
/v2/huggingface/model:
get:
summary: Hugging Face Model
description: 'Read one public Hugging Face model by an id such as google-bert/bert-base-uncased.
**Credit cost:** 1 credit per call'
operationId: get-huggingface-model
security:
- ApiKeyAuth: []
parameters:
- name: query
in: query
required: true
description: 'Required. A public model id (owner/name) or a huggingface.co model URL. Reserved site paths such as models, datasets, or spaces return 400.
**Example:**
```
google-bert/bert-base-uncased
```
**URL example:**
```
https://huggingface.co/google-bert/bert-base-uncased
```'
schema:
type: string
description: 'Required. A public model id (owner/name) or a huggingface.co model URL. Reserved site paths such as models, datasets, or spaces return 400.
**Example:**
```
google-bert/bert-base-uncased
```
**URL example:**
```
https://huggingface.co/google-bert/bert-base-uncased
```'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/is_async'
- $ref: '#/components/parameters/soft_fail'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
id:
type: string
sha:
type: string
url:
type: string
tags:
type: array
items:
type: string
gated:
type: boolean
likes:
type: integer
author:
type: string
license:
type: string
private:
type: boolean
datasets:
type: array
items:
type: string
disabled:
type: boolean
language:
type: array
items:
type: string
downloads:
type: integer
created_at:
type: string
mask_token:
type: string
library_name:
type: string
pipeline_tag:
type: string
last_modified:
type: string
trending_score:
nullable: true
examples:
bert-base-uncased:
value:
id: google-bert/bert-base-uncased
sha: 86b5e0934494bd15c9632b12f734a8a67f723594
url: https://huggingface.co/google-bert/bert-base-uncased
tags:
- transformers
- pytorch
- tf
- jax
- rust
- coreml
- onnx
- safetensors
- bert
- fill-mask
- exbert
- en
- dataset:bookcorpus
- dataset:wikipedia
- arxiv:1810.04805
- license:apache-2.0
- endpoints_compatible
- deploy:sagemaker
- deploy:azure
- region:us
gated: false
likes: 3060
author: google-bert
license: apache-2.0
private: false
datasets:
- bookcorpus
- wikipedia
disabled: false
language:
- en
downloads: 29160167
created_at: '2022-03-02T23:29:04.000Z'
mask_token: '[MASK]'
library_name: transformers
pipeline_tag: fill-mask
last_modified: '2024-02-19T11:06:12.000Z'
trending_score: null
'400':
description: Bad Request — missing or invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Bad Request
'401':
description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalidKey:
value:
error: Invalid API Key
planRateLimit:
value:
error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
keyQuota:
value:
error: 'Rate limit exceeded for the API key: quota monthly'
'402':
description: Payment Required — your subscription or credit balance is insufficient.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Payment required
'500':
description: Internal Server Error — something went wrong on our side.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Internal Error
tags:
- Huggingface
post:
summary: Hugging Face Model
description: 'Read one public Hugging Face model by an id such as google-bert/bert-base-uncased.
**Credit cost:** 1 credit per call'
operationId: post-huggingface-model
security:
- ApiKeyAuth: []
parameters:
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/is_async'
- $ref: '#/components/parameters/soft_fail'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
query:
type: string
description: 'Required. A public model id (owner/name) or a huggingface.co model URL. Reserved site paths such as models, datasets, or spaces return 400.
**Example:**
```
google-bert/bert-base-uncased
```
**URL example:**
```
https://huggingface.co/google-bert/bert-base-uncased
```'
required:
- query
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
id:
type: string
sha:
type: string
url:
type: string
tags:
type: array
items:
type: string
gated:
type: boolean
likes:
type: integer
author:
type: string
license:
type: string
private:
type: boolean
datasets:
type: array
items:
type: string
disabled:
type: boolean
language:
type: array
items:
type: string
downloads:
type: integer
created_at:
type: string
mask_token:
type: string
library_name:
type: string
pipeline_tag:
type: string
last_modified:
type: string
trending_score:
nullable: true
examples:
bert-base-uncased:
value:
id: google-bert/bert-base-uncased
sha: 86b5e0934494bd15c9632b12f734a8a67f723594
url: https://huggingface.co/google-bert/bert-base-uncased
tags:
- transformers
- pytorch
- tf
- jax
- rust
- coreml
- onnx
- safetensors
- bert
- fill-mask
- exbert
- en
- dataset:bookcorpus
- dataset:wikipedia
- arxiv:1810.04805
- license:apache-2.0
- endpoints_compatible
- deploy:sagemaker
- deploy:azure
- region:us
gated: false
likes: 3060
author: google-bert
license: apache-2.0
private: false
datasets:
- bookcorpus
- wikipedia
disabled: false
language:
- en
downloads: 29160167
created_at: '2022-03-02T23:29:04.000Z'
mask_token: '[MASK]'
library_name: transformers
pipeline_tag: fill-mask
last_modified: '2024-02-19T11:06:12.000Z'
trending_score: null
'400':
description: Bad Request — missing or invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Bad Request
'401':
description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalidKey:
value:
error: Invalid API Key
planRateLimit:
value:
error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
keyQuota:
value:
error: 'Rate limit exceeded for the API key: quota monthly'
'402':
description: Payment Required — your subscription or credit balance is insufficient.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Payment required
'500':
description: Internal Server Error — something went wrong on our side.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Internal Error
tags:
- Huggingface
/v2/huggingface/search:
get:
summary: Hugging Face Search
description: 'Search the public Hugging Face models API by keyword and follow pagination.next to the next cursor page.
**Credit cost:** 1 credit per call'
operationId: get-huggingface-search
security:
- ApiKeyAuth: []
parameters:
- name: query
in: query
required: true
description: 'Required. A model keyword, a huggingface.co/models URL, or the full pagination.next cursor URL from a previous page.
**Example:**
```
bert
```
**Next-page example:** pass the pagination.next value unchanged as query.'
schema:
type: string
description: 'Required. A model keyword, a huggingface.co/models URL, or the full pagination.next cursor URL from a previous page.
**Example:**
```
bert
```
**Next-page example:** pass the pagination.next value unchanged as query.'
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/is_async'
- $ref: '#/components/parameters/soft_fail'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
properties:
id:
type: string
url:
type: string
tags:
type: array
items:
type: string
likes:
type: integer
private:
type: boolean
downloads:
type: integer
created_at:
type: string
library_name:
type: string
pipeline_tag:
type: string
trending_score:
type: integer
pagination:
type: object
properties:
next:
type: string
page:
type: integer
per_page:
type: integer
total_pages:
nullable: true
total_results:
nullable: true
examples:
bert-base-uncased:
value:
results:
- id: google-bert/bert-base-uncased
url: https://huggingface.co/google-bert/bert-base-uncased
tags:
- transformers
- pytorch
- tf
- jax
- rust
- coreml
- onnx
- safetensors
- bert
- fill-mask
- exbert
- en
- dataset:bookcorpus
- dataset:wikipedia
- arxiv:1810.04805
- license:apache-2.0
- endpoints_compatible
- deploy:sagemaker
- deploy:azure
- region:us
likes: 3060
private: false
downloads: 29160167
created_at: '2022-03-02T23:29:04.000Z'
library_name: transformers
pipeline_tag: fill-mask
trending_score: 6
pagination:
next: https://huggingface.co/api/models?search=bert&limit=20&cursor=eyIkb3IiOlt7InRyZW5kaW5nU2NvcmUiOjEsIl9pZCI6eyIkZ3QiOiI2MjFmZmRjMDM2NDY4ZDcwOWYxNzQ1MDAifX0seyJ0cmVuZGluZ1Njb3JlIjp7IiRsdCI6MX19LHsidHJlbmRpbmdTY29yZSI6bnVsbH1dLCJzZWFyY2hTZXF1ZW5jZVRva2VuIjoiQ05DSy93RWFDU0VBQUFBQUFBRHdQeG9PV2d4aUgvM0FOa2FOY0o4WFJRQWlEbG9NWWgvOXdEWkdqWENmRjBVQSJ9
page: 1
per_page: 20
total_pages: null
total_results: null
'400':
description: Bad Request — missing or invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Bad Request
'401':
description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalidKey:
value:
error: Invalid API Key
planRateLimit:
value:
error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
keyQuota:
value:
error: 'Rate limit exceeded for the API key: quota monthly'
'402':
description: Payment Required — your subscription or credit balance is insufficient.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Payment required
'500':
description: Internal Server Error — something went wrong on our side.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Internal Error
tags:
- Huggingface
post:
summary: Hugging Face Search
description: 'Search the public Hugging Face models API by keyword and follow pagination.next to the next cursor page.
**Credit cost:** 1 credit per call'
operationId: post-huggingface-search
security:
- ApiKeyAuth: []
parameters:
- $ref: '#/components/parameters/fields'
- $ref: '#/components/parameters/is_async'
- $ref: '#/components/parameters/soft_fail'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
query:
type: string
description: 'Required. A model keyword, a huggingface.co/models URL, or the full pagination.next cursor URL from a previous page.
**Example:**
```
bert
```
**Next-page example:** pass the pagination.next value unchanged as query.'
required:
- query
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
properties:
id:
type: string
url:
type: string
tags:
type: array
items:
type: string
likes:
type: integer
private:
type: boolean
downloads:
type: integer
created_at:
type: string
library_name:
type: string
pipeline_tag:
type: string
trending_score:
type: integer
pagination:
type: object
properties:
next:
type: string
page:
type: integer
per_page:
type: integer
total_pages:
nullable: true
total_results:
nullable: true
examples:
bert-base-uncased:
value:
results:
- id: google-bert/bert-base-uncased
url: https://huggingface.co/google-bert/bert-base-uncased
tags:
- transformers
- pytorch
- tf
- jax
- rust
- coreml
- onnx
- safetensors
- bert
- fill-mask
- exbert
- en
- dataset:bookcorpus
- dataset:wikipedia
- arxiv:1810.04805
- license:apache-2.0
- endpoints_compatible
- deploy:sagemaker
- deploy:azure
- region:us
likes: 3060
private: false
downloads: 29160167
created_at: '2022-03-02T23:29:04.000Z'
library_name: transformers
pipeline_tag: fill-mask
trending_score: 6
pagination:
next: https://huggingface.co/api/models?search=bert&limit=20&cursor=eyIkb3IiOlt7InRyZW5kaW5nU2NvcmUiOjEsIl9pZCI6eyIkZ3QiOiI2MjFmZmRjMDM2NDY4ZDcwOWYxNzQ1MDAifX0seyJ0cmVuZGluZ1Njb3JlIjp7IiRsdCI6MX19LHsidHJlbmRpbmdTY29yZSI6bnVsbH1dLCJzZWFyY2hTZXF1ZW5jZVRva2VuIjoiQ05DSy93RWFDU0VBQUFBQUFBRHdQeG9PV2d4aUgvM0FOa2FOY0o4WFJRQWlEbG9NWWgvOXdEWkdqWENmRjBVQSJ9
page: 1
per_page: 20
total_pages: null
total_results: null
'400':
description: Bad Request — missing or invalid parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Bad Request
'401':
description: Unauthorized — the API key is missing, invalid, inactive, or expired, or a rate limit was exceeded (`Rate limit exceeded…` message).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalidKey:
value:
error: Invalid API Key
planRateLimit:
value:
error: 'Rate limit exceeded: You''ve exceeded the per second rate limit on your subscription'
keyQuota:
value:
error: 'Rate limit exceeded for the API key: quota monthly'
'402':
description: Payment Required — your subscription or credit balance is insufficient.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Payment required
'500':
description: Internal Server Error — something went wrong on our side.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: Internal Error
tags:
- Huggingface
components:
parameters:
fields:
name: fields
in: query
required: false
description: Comma-separated list of response fields to return, with dot notation for nested fields (e.g. `name,location.city`).
schema:
type: string
is_async:
name: is_async
in: query
required: false
description: 'Run the request as a background job: the API answers `202` with a `job_id` to poll on `GET /v1/jobs/{id}`.'
schema:
type: boolean
default: false
soft_fail:
name: soft_fail
in: query
required: false
description: Return HTTP 200 even when the request fails; the error is in the `error` field of the body.
schema:
type: boolean
default: false
schemas:
ErrorResponse:
type: object
required:
- error
properties:
error:
type: string
description: Human-readable error message.
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: Your API key. Include it in the x-api-key header for every request.