Skip to main content
Version: 1.11.0-beta

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: GetLayersResponse containing data.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.ts for full response schema.