Skip to content

Commit 105cc26

Browse files
authored
Merge pull request #24 from adityaoberai/docs-rest-api
Add REST API usage docs
2 parents 3d2ae49 + 99f0754 commit 105cc26

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,29 @@ https://github.com/adityaoberai/Alt-Text-Generator/assets/31401437/cdf2ce3c-0c72
2323
- Add your Azure Computer Vision endpoint and API key to the .env file
2424
- Add your environment variables to the Vercel project using `vercel env add ENV_VAR` command (replace `ENV_VAR` with your environment variables)
2525
- Run `vercel dev`
26+
27+
## Using REST API
28+
29+
### POST `/api/alttext`
30+
31+
32+
**Parameters**
33+
34+
| Name | Description | Location | Type |
35+
| ----------------- | ------------------------------------ | -------- | -------------------------- |
36+
| Content-Type | The content type of the request body | Header | `application/octet-stream` |
37+
| image | Image to get alt text for | Body | Image (Binary data) |
38+
39+
**Request**
40+
41+
Byte array in request body
42+
43+
**Response**
44+
45+
Sample Response:
46+
47+
```json
48+
{
49+
message: 'a black and white image of a couple of cards',
50+
}
51+
```

0 commit comments

Comments
 (0)