ProtectedclientProtectedeip712ProtectedlistenersSend new project request to the network. Returns project instance which can be used to track progress and get resulting images or videos.
ProtectedemitDispatch an event to all listeners
Estimate the cost of an audio generation job.
The parameters required for audio cost estimation. This includes:
Returns an object containing the estimated costs in different units.
Estimate image project cost
Estimate image enhancement cost
Estimates the cost of generating a video based on the provided parameters.
The parameters required for video cost estimation. This includes:
Returns an object containing the estimated costs for the video in different units:
Get available models and their worker counts. Normally, you would get list once you connect to the server, but you can also call this method to get the list of available models manually.
Get supported size presets for the model and network. Size presets are cached for 10 minutes.
'fast' or 'relaxed'
model id (e.g. 'flux1-schnell-fp8')
force refresh cache
Retrieves the video asset configuration for a given video model identifier. Validates whether the provided model ID corresponds to a video model. If it does, returns the appropriate video asset configuration based on the workflow type.
The identifier of the video model to retrieve the configuration for.
The video asset configuration object where key is asset field and value is
either required, forbidden or optional. Returns null if no rules defined for the model.
Remove an event listener
Add an event listener, returns a function that can be called to remove the listener
Add an event listener that will be called only once
Wait for available models to be received from the network. Useful for scripts that need to run after the models are loaded.
timeout in milliseconds until the promise is rejected
Retrieves a list of projects created and tracked by this SogniClient instance.
Note: When a project is finished, it will be removed from this list after 30 seconds