List
The API request to get a list of a user’s saved images.
URL
GET https://api.gyazo.com/api/images
parameters
Key | Type | Required | Default | Remarks |
---|
access_token | string | ✓ | | User's access token |
page | integer | | 1 | |
per_page | integer | | 20 | 1 to 100 |
response header
X-Total-Count: 350
X-Current-Page: 1
X-Per-Page: 20
X-User-Type: lite
response body
[
{
"image_id": "8980c52421e452ac3355ca3e5cfe7a0c",
"permalink_url": "http://gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c",
"thumb_url": "https://i.gyazo.com/thumb/afaiefnaf.png",
"url": "https://i.gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c.png",
"type": "png",
"created_at": "2014-05-21 14:23:10+0900",
"metadata": {
"app": null,
"title": null,
"url": null,
"desc": ""
},
"ocr": {
"locale": "en",
"description": "Gyazo\n",
}
},
{
"image_id": "8980c52421e452ac3355ca3e5cfe7a0c",
"permalink_url": "http://gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c",
"thumb_url": "https://i.gyazo.com/thumb/afaiefnaf.png",
"url": "https://i.gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c.png",
"type": "png",
"created_at": "2014-05-21 14:23:10+0900",
"metadata": {
"app": null,
"title": null,
"url": null,
"desc": ""
},
"ocr": {
"locale": null,
"description": "",
}
},
...
]
Image
The API request to get an image.
URL
GET https://api.gyazo.com/api/images/:image_id
parameters
Key | Type | Required | Default | Remarks |
---|
access_token | string | ✓ | | User's access token |
image_id | string | ✓ | | |
response body
{
"image_id": "27a9dca98bcf5cafc0bd84a80ee9c0a1",
"permalink_url": null,
"thumb_url": null,
"type": "png",
"created_at": "2018-07-24T07:33:24.771Z",
"metadata": {
"app": null,
"title": null,
"url": null,
"desc": ""
},
"ocr": {
"locale": "en",
"description": "Gyazo\n",
}
}
Upload
The API request to upload an image.
NOTICE
- Use multipart/form-data
- Be aware that the URL is different from the other API
URL
POST https://upload.gyazo.com/api/upload
parameters
Key | Type | Required | Default | Remarks |
---|
access_token | string | ✓ | | User's access token |
imagedata | binary | ✓ | | |
metadata_is_public | string 'true' or 'false' | | | Boolean value about publish URL and title metadata |
referer_url | string | | | Referer site URL |
title | string | | | Site title |
desc | string | | | Comment |
created_at | float | | | Image's created time, Unix time |
collection_id | string | | | You can add image to collection which enables you to edit. |
response
{
"image_id" : "8980c52421e452ac3355ca3e5cfe7a0c",
"permalink_url": "http://gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c",
"thumb_url" : "https://i.gyazo.com/thumb/180/afaiefnaf.png",
"url" : "https://i.gyazo.com/8980c52421e452ac3355ca3e5cfe7a0c.png",
"type": "png"
}
Upload with Browser Session API
This API will allow uploads simply by using the Gyazo browser session token. Because there is no need to have a user log in, you can allow uploads very easily. First, use post with the parameter set as a data URI of the image you want to upload, and the server will return a new Gyazo URL that can be used temporarily for verification purposes. By opening the URL in a browser, the image will be tied to the user session in that browser. The URL will only be active for 30 seconds. After that it will result in an error when accessing the URL. (2019-09: For security reason, image_url was changed to accept only Data URI.)
URL
POST https://upload.gyazo.com/api/upload/easy_auth
parameters
Key | Type | Required | Content | Remarks |
---|
client_id | string | ✓ | | Your application's client id |
image_url | string | ✓ | | Data URI of an image (e.g. data:image/png;base64,... ) |
referer_url | string | ✓ | | Referer site URL |
title | string | | | Site title and comment |
metadata_is_public | string 'true' or 'false' | | | Boolean string value about publish URL and title metadata |
response
{
"get_image_url" : "https://gyazo.com/api/upload/8980c52421e452ac3355ca3e5cfe7a0c",
"expires_at" : 1401178164
}
Key | Type | Description |
---|
get_image_url | string | Get will respond with the access URL so the server can detect which user session is active. |
expires_at | integer | Time when the URL expires (UNIX Time) |
Delete
The API request to delete an image.
URL
DELETE https://api.gyazo.com/api/images/:image_id
parameters
Key | Type | Required | Default | Remarks |
---|
image_id | string | ✓ | | You can only delete your own images |
response
{
"image_id": "8980c52421e452ac3355ca3e5cfe7a0c",
"type": "png"
}
oEmbed
This API provide image's raw URL. This API follows oEmbed. It's a format for allowing an embedded representation of a URL on third party sites.
URL
GET https://api.gyazo.com/api/oembed?url=:image_url
parameters
Key | Type | Required | Default | Remarks |
---|
url | string | ✓ | | You can only set URL of Gyazo image page ( http://gyazo.com/XXXXXXXXXXXX ) |
response
{
"version":"1.0",
"type":"photo",
"provider_name":"Gyazo",
"provider_url":"https://gyazo.com",
"url":"http://i.gyazo.com/8c9d9c8ec14dec4631b6ec77d1c85450_1.png",
"width":617,
"height":597
}
note
Request URL set href attribute on link tag in image page. <link href="https://gyazo.com/api/oembed?url=http://gyazo.com/XXXXXXXXXXXX" rel="alternate" title="Screenshot by Gyazo" type="application/json+oembed" />