API Endpoints

Create a new object

Endpoint:

https://api.sloyd.ai/create

Called in a post request.

Input schema:

{
    "Prompt": "string",
    "ClientId": "string",
    "ClientSecret": "string",
    "ModelOutputType": "gltf",
    "ResponseEncoding": "json"
}
Parameter
Required?
Function
Default

ClientId

Yes

Authentication

ClientSecret

Yes

Prompt

Yes

A description of the 3D model requested

LOD

A number between 0.01 to 1. The higher the number, the mesh will be made from more triangles.

0.5

AiPromptModifiers

recoloring texturing When this field is empty, the object will be created in a default color (for example, in our system all the car parts are blue). When you add this field the AI will take color or texture instructions from the prompt.

ModelOutputType

Response format and 3D file format. Available values: gtlf, glb, obj, stl, usd (usdz with partial support)

gltf

ResponseEncoding

Available values:

  • json

  • MessagePack

  • Only3dModelFormatWithoutMetaData

ThumbnailPreviewExportType

Optional Preview image. Available values: png, jpg, webp

ThumbnailPreviewSizeX

Width in pixels of the preview image (e.g. 256) Min: 1, Max: 16384

ThumbnailPreviewSizeY

Hight in pixels of the preview image (e.g. 256) Min: 1, Max: 16384

Output schema:

{
    "InteractionId": "63a1ab21-e0fc-4f7e-ab7d-1b904ee893ab",
    "Name": "string",
    "ConfidenceScore": num,
    "ResponseEncoding": "string",
    "ModelOutputType": "string",
    "ModelData": "string",
    "ThumbnailPreviewExportType": "string",
    "ThumbnailPreview": "string"
}
Parameter
Description

InteractionId

A reference to the generated model, it's required for AI editing.

Name

A basic name for the object. It could be useful for categorization.

ConfidenceScore

A score indicating how confident the AI is that the returned object matches the text prompt.

ResponseEncoding

file format, json or message pack

ModelOutputType

3D file format: obj, glb, gltf, usd, usdz, stl

ModelData

The 3D file

ThumbnailPreviewExportType

the image file format, if available. Options: none, jpg, png, webp

ThumbnailPreview

The preview image file, if available.

Edit an existing object

Endpiont:

https://api.sloyd.ai/edit

Called in a post request.

Input schema:

{
    "Prompt": "string",
    "ClientId": "string",
    "ClientSecret": "string",
    "ModelOutputType": "gltf",
    "ResponseEncoding": "json",
    "InteractionId": "string"
}

Every input parameter that is in create can be added to edit as well. Yet, in edit, you must include interactionId. (See create input schema table for a detailed parameter descriptions.)

Output schema:

{
    "InteractionId": "string",
    "Name": null,
    "ResponseType": "INFO",
    "ResponseMessage": "string",
    "ResponseEncoding": "JSON",
    "ModelOutputType": "Obj",
    "ModelData": "string"
}

Parameter

Description

InteractionId

A reference to the generated model, it's required for AI editing.

Name

Field is part of the schema but in case of edit it is null

ResponseType

INFO - the model was changed the soda_response_message contains a description how it was changed. WARNING - the model was not changed and response message contains information on why it was not changed. ERROR - The call was timed out or other error.

ResponseMessage

A human readable text description of what where the changes made to the model. Of in case of 'warning' why a change could not be made.

ModelOutputType

3D file format: obj, glb, gltf, usd, stl

ModelData

The 3D file

Last updated