Using the APIText to Image

Text to Image

Overview

Text to Image generates images from text. Refer to the Sessions Overview for more general information on how to use the API.

Create a Text to Image session

Send a POST request with your text prompt to start generating images.

POST
https://api.csm.ai/v3/sessions/

Code snippets

Response

Check session status and get results

Use the session ID from the previous step to monitor your generation progress.

GET
https://api.csm.ai/v3/sessions/{session_id}

Code snippets

Response

The Text to Image session object

Complete session object