pixelImageInit(params: Object)

Requires:
AIKit≥1.8.0@ray-js/ray≥1.7.60
Platforms:
iOSAndroid
import { ai } from '@ray-js/ray';

const { pixelImageInit } = ai;

// Promise usage
try {
  const res = await pixelImageInit();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Image generation initialization

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { ai } from '@ray-js/ray'

ai.pixelImageInit({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});