Brand Values
The Cyanite.ai API offers the functionality to retrieve brand values for a track (LibraryTrack
or SpotifyTrack
).
The functionality is exposed via the Track.brandValues
field.
The specific brand values must be selected and the track must be analyzed before the brand values can be retrieved.
Getting the list of possible brand values
query BrandValues {
brandValues {
... on BrandValuesSuccess {
values
}
... on BrandValuesError {
code
message
}
}
}
Selecting the brand values (max. 20)
Mutation:
mutation SelectBrandValues($input: SelectBrandValuesInput!) {
selectBrandValues(input: $input) {
... on SelectBrandValuesSuccess {
success
}
... on BrandValuesError {
code
message
}
}
}
Input
Accordingly to the documentation
the example input is:
{
"input": {
"values": [
"zen",
"youthful",
"worried",
"win",
"wild"
]
}
}
Example Query Operation
query LibraryTrackQuery($libraryTrackId: ID!) {
libraryTrack(id: $libraryTrackId) {
__typename
... on LibraryTrackNotFoundError {
message
}
... on LibraryTrack {
id
title
brandValues {
__typename
... on BrandValuesError {
message
code
}
... on BrandValues {
values {
value
weight
}
}
}
}
}
}