Docs: add X-API-Key header to curl examples
This commit is contained in:
30
README.md
30
README.md
@@ -28,14 +28,14 @@ curl -H "X-API-Key: <your-api-key>" https://vision.klevze.net/health
|
|||||||
|
|
||||||
### With URL
|
### With URL
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/all \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/all \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### With file upload (multipart)
|
### With file upload (multipart)
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/all/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/all/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F "limit=5"
|
-F "limit=5"
|
||||||
```
|
```
|
||||||
@@ -44,26 +44,26 @@ curl -X POST https://vision.klevze.net/analyze/all/file \
|
|||||||
|
|
||||||
### CLIP tags
|
### CLIP tags
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/clip -H "Content-Type: application/json" \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/clip -H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### CLIP tags (file)
|
### CLIP tags (file)
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/clip/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/clip/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F "limit=5"
|
-F "limit=5"
|
||||||
```
|
```
|
||||||
|
|
||||||
### BLIP caption
|
### BLIP caption
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/blip -H "Content-Type: application/json" \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/blip -H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","variants":3}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","variants":3}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### BLIP caption (file)
|
### BLIP caption (file)
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/blip/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/blip/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F "variants=3" \
|
-F "variants=3" \
|
||||||
-F "max_length=60"
|
-F "max_length=60"
|
||||||
@@ -71,13 +71,13 @@ curl -X POST https://vision.klevze.net/analyze/blip/file \
|
|||||||
|
|
||||||
### YOLO detect
|
### YOLO detect
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/yolo -H "Content-Type: application/json" \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/yolo -H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","conf":0.25}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","conf":0.25}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### YOLO detect (file)
|
### YOLO detect (file)
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/analyze/yolo/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/analyze/yolo/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F "conf=0.25"
|
-F "conf=0.25"
|
||||||
```
|
```
|
||||||
@@ -86,14 +86,14 @@ curl -X POST https://vision.klevze.net/analyze/yolo/file \
|
|||||||
|
|
||||||
### Store image embedding by URL
|
### Store image embedding by URL
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/vectors/upsert \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/vectors/upsert \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","id":"img-001","metadata":{"category":"wallpaper"}}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","id":"img-001","metadata":{"category":"wallpaper"}}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Store image embedding by file upload
|
### Store image embedding by file upload
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/vectors/upsert/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/vectors/upsert/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F 'id=img-002' \
|
-F 'id=img-002' \
|
||||||
-F 'metadata_json={"category":"photo"}'
|
-F 'metadata_json={"category":"photo"}'
|
||||||
@@ -101,31 +101,31 @@ curl -X POST https://vision.klevze.net/vectors/upsert/file \
|
|||||||
|
|
||||||
### Search similar images by URL
|
### Search similar images by URL
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/vectors/search \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/vectors/search \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
-d '{"url":"https://files.skinbase.org/img/aa/bb/cc/md.webp","limit":5}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Search similar images by file upload
|
### Search similar images by file upload
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/vectors/search/file \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/vectors/search/file \
|
||||||
-F "file=@/path/to/image.webp" \
|
-F "file=@/path/to/image.webp" \
|
||||||
-F "limit=5"
|
-F "limit=5"
|
||||||
```
|
```
|
||||||
|
|
||||||
### List collections
|
### List collections
|
||||||
```bash
|
```bash
|
||||||
curl https://vision.klevze.net/vectors/collections
|
curl -H "X-API-Key: <your-api-key>" https://vision.klevze.net/vectors/collections
|
||||||
```
|
```
|
||||||
|
|
||||||
### Get collection info
|
### Get collection info
|
||||||
```bash
|
```bash
|
||||||
curl https://vision.klevze.net/vectors/collections/images
|
curl -H "X-API-Key: <your-api-key>" https://vision.klevze.net/vectors/collections/images
|
||||||
```
|
```
|
||||||
|
|
||||||
### Delete points
|
### Delete points
|
||||||
```bash
|
```bash
|
||||||
curl -X POST https://vision.klevze.net/vectors/delete \
|
curl -H "X-API-Key: <your-api-key>" -X POST https://vision.klevze.net/vectors/delete \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"ids":["img-001","img-002"]}'
|
-d '{"ids":["img-001","img-002"]}'
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user