
Table of Contents
Note: Image services are a bit different from the rest of
the Music API in that they sit behind a large globally distributed cache.
As a result, ALL calls must take the form
http://d.yimg.com/ec/image/v1/[service], and do NOT support an appid parameter.
/video/{id}?size=...&encoding=...&crop=...&fallback=...
GET
Returns an image of an video. This is typically a thumbnail taken from the actual video itself.
Examples:
Responses: None
Required Parameters
| Parameter | Value | Description |
|---|---|---|
| id | string | Asset id of the image being requested. |
Optional Parameters
| Parameter | Value | Default / Possible values | Description |
|---|---|---|---|
| size | string | If no size is specified, the largest unscaled matching image will be returned. | Size of the image to return, in the format WxH where W is the width in pixels, and H is the height in pixels. It is also valid to specify only one of the dimensions, (e.g. 200x or x200), in which case, the missing dimension will be filled in by preserving the original aspect ratio of the source image. You can also just specify a single number, which will used as the width (e.g. size=200 is equivalent to size=200x). If no size is specified, the largest unscaled matching image will be returned. |
| encoding | string | One of:
|
Encoding to use when rendering the image. |
| crop | boolean | 0 or 1 (default: 1) | When requesting a specific aspect ratio, if there is no source image with a matching aspect ratio, when this parameter is set to true, the source image will first be cropped to the requested aspect ratio, before it is resized. |
| fallback | string | One of:
|
|
/station/video/category/{id}?locale=...&size=...&encoding=...&crop=...&fallback=...&tile=...&gutter=...
GET
Returns an image of a video station, made up of a composite of up to 4 videos occurring in the station.
Examples:
Responses: None
Required Parameters
| Parameter | Value | Description |
|---|---|---|
| id | string | Asset id of the image being requested. |
Optional Parameters
| Parameter | Value | Default / Possible values | Description |
|---|---|---|---|
| locale | string | US | 2-letter locale code. Defaults to "US". |
| size | string | If no size is specified, the largest unscaled matching image will be returned. | Size of the image to return, in the format WxH where W is the width in pixels, and H is the height in pixels. It is also valid to specify only one of the dimensions, (e.g. 200x or x200), in which case, the missing dimension will be filled in by preserving the original aspect ratio of the source image. You can also just specify a single number, which will used as the width (e.g. size=200 is equivalent to size=200x). If no size is specified, the largest unscaled matching image will be returned. |
| encoding | string | One of:
|
Encoding to use when rendering the image. |
| crop | boolean | 0 or 1 (default: 1) | When requesting a specific aspect ratio, if there is no source image with a matching aspect ratio, when this parameter is set to true, the source image will first be cropped to the requested aspect ratio, before it is resized. |
| fallback | string | One of:
|
|
| tile | int | Number of images to tile horizontally in a composite image. For example, if there are 4 source images in a composite, and tile is 1, then the resulting composite image will be 1 vertical column of 4 images. If tile is 2, the result will be 2x2, and if tile is 4, the result will be 1 horizontal row of 4 images. | |
| gutter | boolean | 0 or 1 (default: 0) | When true, adds a 1-pixel gutter to separate the images in the composite. |