Skip to content

Commit 92fe08d

Browse files
Update API inference documentation (automated) (#1503)
Co-authored-by: hanouticelina <[email protected]>
1 parent 6fdedd1 commit 92fe08d

20 files changed

+45
-47
lines changed

docs/api-inference/tasks/audio-classification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Explore all available models and find the one that suits you best [here](https:/
4343
curl https://api-inference.huggingface.co/models/ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition \
4444
-X POST \
4545
--data-binary '@sample1.flac' \
46-
-H "Authorization: Bearer hf_***"
46+
-H 'Authorization: Bearer hf_***'
4747
```
4848
</curl>
4949

@@ -74,7 +74,7 @@ async function query(filename) {
7474
"https://api-inference.huggingface.co/models/ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition",
7575
{
7676
headers: {
77-
Authorization: "Bearer hf_***"
77+
Authorization: "Bearer hf_***",
7878
"Content-Type": "application/json",
7979
},
8080
method: "POST",

docs/api-inference/tasks/automatic-speech-recognition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Explore all available models and find the one that suits you best [here](https:/
4444
curl https://api-inference.huggingface.co/models/openai/whisper-large-v3 \
4545
-X POST \
4646
--data-binary '@sample1.flac' \
47-
-H "Authorization: Bearer hf_***"
47+
-H 'Authorization: Bearer hf_***'
4848
```
4949
</curl>
5050

@@ -75,7 +75,7 @@ async function query(filename) {
7575
"https://api-inference.huggingface.co/models/openai/whisper-large-v3",
7676
{
7777
headers: {
78-
Authorization: "Bearer hf_***"
78+
Authorization: "Bearer hf_***",
7979
"Content-Type": "application/json",
8080
},
8181
method: "POST",

docs/api-inference/tasks/chat-completion.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The API supports:
6262
<curl>
6363
```bash
6464
curl 'https://api-inference.huggingface.co/models/google/gemma-2-2b-it/v1/chat/completions' \
65-
-H "Authorization: Bearer hf_***" \
65+
-H 'Authorization: Bearer hf_***' \
6666
-H 'Content-Type: application/json' \
6767
--data '{
6868
"model": "google/gemma-2-2b-it",
@@ -209,7 +209,7 @@ To use the JavaScript client, see `huggingface.js`'s [package reference](https:/
209209
<curl>
210210
```bash
211211
curl 'https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-11B-Vision-Instruct/v1/chat/completions' \
212-
-H "Authorization: Bearer hf_***" \
212+
-H 'Authorization: Bearer hf_***' \
213213
-H 'Content-Type: application/json' \
214214
--data '{
215215
"model": "meta-llama/Llama-3.2-11B-Vision-Instruct",

docs/api-inference/tasks/feature-extraction.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ curl https://api-inference.huggingface.co/models/thenlper/gte-large \
4444
-X POST \
4545
-d '{"inputs": "Today is a sunny day and I will get some ice cream."}' \
4646
-H 'Content-Type: application/json' \
47-
-H "Authorization: Bearer hf_***"
47+
-H 'Authorization: Bearer hf_***'
4848
```
4949
</curl>
5050

@@ -74,7 +74,7 @@ async function query(data) {
7474
"https://api-inference.huggingface.co/models/thenlper/gte-large",
7575
{
7676
headers: {
77-
Authorization: "Bearer hf_***"
77+
Authorization: "Bearer hf_***",
7878
"Content-Type": "application/json",
7979
},
8080
method: "POST",

docs/api-inference/tasks/fill-mask.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ curl https://api-inference.huggingface.co/models/google-bert/bert-base-uncased \
4040
-X POST \
4141
-d '{"inputs": "The answer to the universe is [MASK]."}' \
4242
-H 'Content-Type: application/json' \
43-
-H "Authorization: Bearer hf_***"
43+
-H 'Authorization: Bearer hf_***'
4444
```
4545
</curl>
4646

@@ -70,7 +70,7 @@ async function query(data) {
7070
"https://api-inference.huggingface.co/models/google-bert/bert-base-uncased",
7171
{
7272
headers: {
73-
Authorization: "Bearer hf_***"
73+
Authorization: "Bearer hf_***",
7474
"Content-Type": "application/json",
7575
},
7676
method: "POST",

docs/api-inference/tasks/image-classification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Explore all available models and find the one that suits you best [here](https:/
3838
curl https://api-inference.huggingface.co/models/google/vit-base-patch16-224 \
3939
-X POST \
4040
--data-binary '@cats.jpg' \
41-
-H "Authorization: Bearer hf_***"
41+
-H 'Authorization: Bearer hf_***'
4242
```
4343
</curl>
4444

@@ -69,7 +69,7 @@ async function query(filename) {
6969
"https://api-inference.huggingface.co/models/google/vit-base-patch16-224",
7070
{
7171
headers: {
72-
Authorization: "Bearer hf_***"
72+
Authorization: "Bearer hf_***",
7373
"Content-Type": "application/json",
7474
},
7575
method: "POST",

docs/api-inference/tasks/image-segmentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Explore all available models and find the one that suits you best [here](https:/
3939
curl https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small \
4040
-X POST \
4141
--data-binary '@cats.jpg' \
42-
-H "Authorization: Bearer hf_***"
42+
-H 'Authorization: Bearer hf_***'
4343
```
4444
</curl>
4545

@@ -70,7 +70,7 @@ async function query(filename) {
7070
"https://api-inference.huggingface.co/models/openmmlab/upernet-convnext-small",
7171
{
7272
headers: {
73-
Authorization: "Bearer hf_***"
73+
Authorization: "Bearer hf_***",
7474
"Content-Type": "application/json",
7575
},
7676
method: "POST",

docs/api-inference/tasks/image-text-to-text.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ curl https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-11B-Vision
4040
-X POST \
4141
-d '{"inputs": "Can you please let us know more details about your "}' \
4242
-H 'Content-Type: application/json' \
43-
-H "Authorization: Bearer hf_***"
43+
-H 'Authorization: Bearer hf_***'
4444
```
4545
</curl>
4646

@@ -96,7 +96,7 @@ async function query(data) {
9696
"https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-11B-Vision-Instruct",
9797
{
9898
headers: {
99-
Authorization: "Bearer hf_***"
99+
Authorization: "Bearer hf_***",
100100
"Content-Type": "application/json",
101101
},
102102
method: "POST",

docs/api-inference/tasks/object-detection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Explore all available models and find the one that suits you best [here](https:/
3838
curl https://api-inference.huggingface.co/models/facebook/detr-resnet-50 \
3939
-X POST \
4040
--data-binary '@cats.jpg' \
41-
-H "Authorization: Bearer hf_***"
41+
-H 'Authorization: Bearer hf_***'
4242
```
4343
</curl>
4444

@@ -69,7 +69,7 @@ async function query(filename) {
6969
"https://api-inference.huggingface.co/models/facebook/detr-resnet-50",
7070
{
7171
headers: {
72-
Authorization: "Bearer hf_***"
72+
Authorization: "Bearer hf_***",
7373
"Content-Type": "application/json",
7474
},
7575
method: "POST",

docs/api-inference/tasks/question-answering.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ For more details about the `question-answering` task, check out its [dedicated p
2626

2727
- [deepset/roberta-base-squad2](https://huggingface.co/deepset/roberta-base-squad2): A robust baseline model for most question answering domains.
2828
- [distilbert/distilbert-base-cased-distilled-squad](https://huggingface.co/distilbert/distilbert-base-cased-distilled-squad): Small yet robust model that can answer questions.
29-
- [google/tapas-base-finetuned-wtq](https://huggingface.co/google/tapas-base-finetuned-wtq): A special model that can answer questions from tables.
3029

3130
Explore all available models and find the one that suits you best [here](https://huggingface.co/models?inference=warm&pipeline_tag=question-answering&sort=trending).
3231

@@ -41,7 +40,7 @@ curl https://api-inference.huggingface.co/models/deepset/roberta-base-squad2 \
4140
-X POST \
4241
-d '{"inputs": { "question": "What is my name?", "context": "My name is Clara and I live in Berkeley." }}' \
4342
-H 'Content-Type: application/json' \
44-
-H "Authorization: Bearer hf_***"
43+
-H 'Authorization: Bearer hf_***'
4544
```
4645
</curl>
4746

@@ -74,7 +73,7 @@ async function query(data) {
7473
"https://api-inference.huggingface.co/models/deepset/roberta-base-squad2",
7574
{
7675
headers: {
77-
Authorization: "Bearer hf_***"
76+
Authorization: "Bearer hf_***",
7877
"Content-Type": "application/json",
7978
},
8079
method: "POST",

0 commit comments

Comments
 (0)