OCS Text-To-Image API

The OCS Text-To-Image API allows you to run image generation tasks implemented by apps using :ref:`the backend Text-To-Image API<text2image>`.

The base URL for all calls to this API is: <nextcloud_base_url>/ocs/v2.php/text2image/

All calls to OCS endpoints require the OCS-APIRequest header to be set to true.

Check availability

field

type

Description

isAvailable

bool

Boolean indicating whether any Text-To-Image providers are installed

Schedule a task

field

type

Description

input

string

The input text for the task

numberOfImages

int

The number of images to generate (optional; default: 8)

appId

string

The id of the requesting app

identifier

string

An app-defined identifier for the task (optional)

If possible the task will be executed while the request is processed on the server, otherwise it is scheduled as a background job.

Fetch a task by ID

Fetch a result image

Delete a task

List tasks by App

field

type

Description

appId

string

The id of the requesting app

identifier

string

An app-defined identifier for the task (optional)