GET
/
songs
/
{id}
JavaScript
import Weights from '@weights-ai/sdk';

const client = new Weights({
  bearerToken: 'My Bearer Token',
});

const song = await client.songs.retrieve('id');

console.log(song.id);
{
  "id": "cmcz89fci00zr0dlt68klunpf",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:35:00Z",
  "startTime": "2024-01-15T10:31:00Z",
  "endTime": "2024-01-15T10:34:00Z",
  "status": "SUCCEEDED",
  "attempt": 1,
  "outputUrl": "https://tracks.weights.com/songs/song_123456789.mp3",
  "lyrics": "In the moonlight, we dance through the night",
  "prompt": "blues, melancholic, raw, lonely bar, heartbreak",
  "queuePosition": 5
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

200
application/json

Returns the details and status of a specific song generation job.

The response is of type object.