3D Models

Make a character image ready to turn into a 3D model, the first step of Directional Sprites on the web. Pass a prompt describing the character, your own image (URL or base64), or both. With an image, it is redrawn as a 3D render, and the prompt becomes the changes to make (e.g. "add a red cape and a sword"); leave the prompt out to keep the character as it is. A redraw is a new picture each time, so call again for another try. The job result is a single image result with a url (not an array): pass that url as create3DModel's image. create3DModel itself converts the image it is given as it is. A call with neither prompt nor image is rejected with HTTP 400, and an image larger than 15MB too. Credits are held when the job is accepted and refunded if it fails or is cancelled. Pass an optional request_id to tag the result so you can retrieve it later via listGenerations (type image). Requires an API key (user scope). The call returns 202 with a job id - poll getApiJob (pass wait 30 to long-poll) honouring poll_after_ms, until status is succeeded; its result field is exactly the response documented for this operation. Synchronous responses are deprecated but still supported: pass `async: false` to block until the result is ready and receive it as the response body. Synchronous calls run on the same queue: the response carries an X-Ludo-Job-Id header, and a job still running after 15 minutes comes back as 202 with the job instead of an error. Each account may have up to 50 generations queued or running at once via the API; a request beyond that returns 429 (code PENDING_JOBS_LIMIT).

Changed on
post/assets/3d-model/image

Request

  • Base URL
    https://api.ludo.ai/api
  • Auth
    API key in header Authorization

Request body

promptstring

Without an image, a description of the character (e.g. "a knight in green armour, full body, standing"). With an image, the changes to make while redrawing it (e.g. "add a red cape and a sword"); optional.

imagestring

Optional URL or base64-encoded image of your own, redrawn as a 3D render.

request_idstring

Optional client-provided identifier, unique per request. Re-sending the same request_id returns the existing job instead of generating again. Also usable as the request_id filter of listGenerations.

asyncboolean

Defaults to true: the call returns 202 immediately with a job id to poll with getApiJob. Set false for a synchronous response (deprecated but supported): the call then blocks until the result is ready.

Response

Success

urlstring
request_idstring
created_atinteger
modelstring

The id of the model that generated or edited the image, so you can tell when the model behind an operation changes. Generated and edited images only.

promptstring

The prompt as the model received it. With augment_prompt on, this is the rewritten prompt, not the one you sent. Generated and edited images only.

Changes