getLayers
Fetches all layers associated with a given run ID.
Signature:
client.edit.getLayers(runId: string): Promise<GetLayersResponse>
- runId: ID of the run to fetch layers for.
- Returns:
GetLayersResponsecontainingdata.layers:Layer[]. - Throws: On validation, network, or API error.
Example (Browser)
const client = new ImagineoAIClient(apiUrl, { apiKey: 'sk-...' });
const layersResponse = await client.edit.getLayers('run-id');
console.log(layersResponse.data.layers);
Example (Node.js)
const client = new ImagineoAIClient(apiUrl, { apiKey: 'sk-...' });
const layersResponse = await client.edit.getLayers('run-id');
console.log(layersResponse.data.layers);
Notes
- Endpoint:
/api/v1/edits/layers?run_id={runId} - See API Reference and
src/types.tsfor full response schema.