Skip to content

Get trend

Viewing v2, the current version

GET
/v2/workspaces/{workspace_id}/trends/{trend_id}
curl --request GET \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/trends/:trend_id \
--header 'Authorization: Bearer <token>'

New in v2. This endpoint has no v1 equivalent.

Get a trend’s full detail: its scenario and variants for a creative trend, its web research for a top trend, and the public reference files that show it, each with a download URL. Pass a reference file_id as guidance to make an asset in the trend’s style.

workspace_id
required
Workspace ID

ID of the workspace that owns the resource.

string format: uuid

ID of the workspace that owns the resource.

trend_id
required
Trend ID

ID of the trend, as returned by the list trends endpoint.

string format: uuid

ID of the trend, as returned by the list trends endpoint.

Successful Response

Media typeapplication/json
GetTrendOutput
object
trend_id
required
Trend ID

The trend’s id; read its full detail with the get-trend call.

string format: uuid
type
required
TrendType

creative for a pattern distilled from mobile game UA video ads, top for a public board entry.

string
Allowed values: creative top
title
required
Title

The name of the trend.

string
summary
required
Summary

What the trend is and why it works; empty while a board trend’s research runs.

string
tags
Tags

Descriptive tags.

Array<string>
genres
Genres

Game genres the trend shows up in.

Array<string>
countries
Countries

Countries the trend was seen in.

Array<string>
match_count
required
Match Count

How many distinct ads show a creative trend; 0 for a top trend.

integer
source
Source

Board slug, such as tiktok, for a top trend.

string
nullable
rank
Rank

Place on the board’s latest refresh, for a top trend.

integer
nullable
previous_rank
Previous Rank

Place on the refresh before; null on a top trend means it is newly charted.

integer
nullable
ranked_at
Ranked At

When the board placement was recorded.

string format: date-time
nullable
created_at
required
Created At

When the trend was first recorded.

string format: date-time
scenario
Scenario

The ad beat by beat, for a creative trend.

string
""
notes
Notes

Why the pattern works and where it fits.

string
nullable
variants
Variants

Alternative angles on the same pattern, for a creative trend.

Array<object>
TrendVariantOutput
object
label
required
Label

Short name of the variant.

string
description
required
Description

How this angle differs from the main pattern.

string
research
Any of:
TrendResearchOutput
object
summary
required
Summary

What the trend is and which media carries it.

string
remix_ideas
required
Remix Ideas

Angles for adapting the trend to game UA video ads.

string
findings
Findings

Grounded claims.

Array<object>
TrendResearchFindingOutput
object
topic
required
Topic

What the finding is about.

string
finding
required
Finding

The grounded claim.

string
source_urls
Source URLs

Pages that back the claim.

Array<string>
sources
Sources

Pages consulted.

Array<object>
TrendResearchSourceOutput
object
title
required
Title

Title of a page the research consulted.

string
url
required
URL

Address of the page.

string
videos
Videos

Videos that show the trend.

Array<object>
TrendResearchVideoOutput
object
url
required
URL

YouTube address of the video; it is not downloaded.

string
title
required
Title

Title of the video.

string
channel
required
Channel

Channel that published it.

string
duration_seconds
Duration Seconds

Length of the video; null when unknown.

integer
nullable
start_seconds
required
Start Seconds

Start of the part that shows the trend.

integer
end_seconds
required
End Seconds

End of the part that shows the trend.

integer
why
required
Why

What that part demonstrates.

string
images
Images

Stills that show the trend.

Array<object>
TrendResearchImageOutput
object
file_id
required
File ID

The image as a public file; it is also among the reference files.

string format: uuid
source_url
required
Source URL

Page the image was found on.

string
shows
required
Shows

One line on what the image shows.

string
uncertainties
Uncertainties

Gaps the research could not close.

Array<string>
researched_at
required
Researched At

When the research ran.

string format: date-time
reference_files
Reference Files

Public files that show the trend, in display order: the matched ads for a creative trend, the research images for a top trend.

Array<object>
TrendReferenceFile
object
file_id
required
File ID

Public file to pass by id as generation guidance, such as a reference video or image.

string format: uuid
url
required
URL

Download URL for the file.

string
content_type
required
Content Type

MIME type, e.g. video/mp4 or image/jpeg.

string
duration_seconds
Duration Seconds

Length of a video; null when not probed.

number
nullable
width
Width

Pixel width; null when not probed.

integer
nullable
height
Height

Pixel height; null when not probed.

integer
nullable
Example
{
"type": "creative",
"scenario": ""
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

The outcome of the request with this Idempotency-Key is not known yet: it is still running, or it failed without a stored response. Retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Invalid input parameters, or an Idempotency-Key reused for a different request.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Rate limited — retry after the number of seconds in Retry-After.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
error_code
required

Machine-readable error code: the last path segment of type.

string
field

The request field the error is about, by its name in the body (on a tool run, in input), on the errors that name one: so far the value a Layer tool fixes on an INFERENCE_TOOL_PIN_MISMATCH, and the scale factor on an INFERENCE_TOOL_UPSCALE_COPIES_SOURCE. Absent otherwise, even when detail names a field.

string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description.",
"error_code": "ERROR_CODE",
"field": "tileability"
}