Compute
workflow
Runs a workflow
moises.compute.workflow
Parameters
Parameter | Type | Description |
---|---|---|
workflowId | string | The ID of the workflow to run |
params | Object | The parameters for the workflow |
Returns:
Promise<Object>
- Promise that resolves with the workflow result
Return Object Structure:
// When the promise resolves, you get:
{
detection: "example" // string
}
Usage Example
import { initMoisesExtension } from '@moises.ai/extension'
const useMoisesExtension = initMoisesExtension({
id: 'id',
name: 'name',
description: 'description',
icon: 'icon',
version: 'version',
author: 'author'
})
const { moises } = useMoisesExtension()
const params = {
inputUrl: 'https://storage.com/audio.mp3',
}
const workflowId = 'workflow'
const result = await moises.compute.workflow({ workflowId, params })
console.log(result) // { detection: 'detection' }
This file is automatically generated. Do not edit manually.