import PiClient from 'withpi';const client = new PiClient({ apiKey: 'My API Key',});const dataGenerationStatus = await client.data.generate.retrieve('job_id');console.log(dataGenerationStatus.job_id);
Copy
{ "data": [ "The quick brown fox jumped over the lazy dog", "The lazy dog was jumped over by the quick brown fox" ], "detailed_status": [ "Downloading model", "Tuning prompt" ], "job_id": "1234abcd", "state": "RUNNING"}
Generate Inputs
Retrieve
Checks the status of a Generation Data job
GET
/
data
/
generate
/
{job_id}
JavaScript
Copy
import PiClient from 'withpi';const client = new PiClient({ apiKey: 'My API Key',});const dataGenerationStatus = await client.data.generate.retrieve('job_id');console.log(dataGenerationStatus.job_id);
Copy
{ "data": [ "The quick brown fox jumped over the lazy dog", "The lazy dog was jumped over by the quick brown fox" ], "detailed_status": [ "Downloading model", "Tuning prompt" ], "job_id": "1234abcd", "state": "RUNNING"}