Image to 3D

Create 3D models from an image input. Supports both PBR and plain albedo textures. The output is provided in glb format.

Create an Image to 3D task

This endpoint allows you to create 3D models from either an uploaded image OR an existing image asset.

To create a 3D model from an image asset, pass the asset ID of an asset created with the text-to-image endpoint.

Either the image or asset_id parameters are required but not both.

POST/v1/tasks/image-to-3d

Optional parameters

  • Name
    image
    Type
    string | null
    Description
    The source image, can be uploaded as multipart/form-data. Cannot be used together with asset_id.
  • Name
    asset_id
    Type
    string<uuid> | null
    Description
    The ID of the asset you are creating a task for. Cannot be used togeter with image parameter.
  • Name
    seed
    Type
    integer | null
    Description
    The seed used to create the task.
  • Name
    version
    Type
    string
    Description
    The currently allowed version is premium-v1.
  • Name
    faceLimit
    Type
    integer
    Description
    Constrain the output to a maximum number of faces. If unspecified the AI model will choose the optimal amount.
  • Name
    pbr
    Type
    boolean
    Description
    Generate PBR textures for the model.

Request

POST/v1/tasks/image-to-3d
curl --request POST \
  --url https://api.goneural.ai/v1/tasks/image-to-3d \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer 123' \
  --header 'Content-Type: application/json' \
  --data '{
  "image": "string",
  "asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4",
  "prompt": "string",
  "negativePrompt": "string",
  "seed": 0,
  "version": "premium-v1",
  "faceLimit": 1000,
  "pbr": true,
  "num_inference_steps": 1,
  "textured_mesh": true
}'

Body

{
  "image": "string",
  "asset_id": "b4695157-0d1d-4da0-8f9e-5c53149389e4",
  "prompt": "string",
  "negativePrompt": "string",
  "seed": 0,
  "version": "premium-v1",
  "faceLimit": 1000,
  "pbr": true
}

Response body parameters

This endpoint returns the task object.

  • Name
    id
    Type
    string
    Description
    Unique identifier for the task.
  • Name
    status
    Type
    TaskStatus
    Description
    The status of the task.
  • Name
    type
    Type
    TaskType
    Description
    The type of task.
  • Name
    seed
    Type
    integer
    Description
    The seed used to create the task.
  • Name
    input
    Type
    Record<string, string>
    Description
    The input used to create the task.
  • Name
    output
    Type
    Record<string, string>
    Description
    A key-value pair of output type to asset URL.
  • Name
    creditUsed
    Type
    integer
    Description
    The amount of credits used by creating this task.
  • Name
    refunded
    Type
    boolean
    Description
    Whether the task was refunded.
  • Name
    userId
    Type
    integer
    Description
    The ID of the user who created the task.
  • Name
    finishedAt
    Type
    string<date-time> | null
    Description
    The timestamp of when the task finished processing.
  • Name
    createdAt
    Type
    string<date-time> | null
    Description
    The timestamp of when the task was created.
  • Name
    asset
    Type
    AssetData | null
    Description
    The asset associated with the task.
  • Name
    assetId
    Type
    string | null
    Description
    The ID of the asset associated with the task.
  • Name
    meta
    Type
    object | null
    Description
    The metadata associated with the task.

Response

{
  "id": "string",
  "status": "queued",
  "type": "premium-image-to-3d",
  "seed": 0,
  "input": {},
  "output": {
    "glb": "https://..."
  },
  "creditUsed": 0,
  "refunded": true,
  "userId": 0,
  "finishedAt": "2019-08-24T14:15:22Z",
  "createdAt": "2019-08-24T14:15:22Z",
  "asset": {
    "id": "string",
    "type": "model",
    "userId": 0,
    "user": {
      "id": 0,
      "name": "string"
    },
    "name": "string",
    "description": "string",
    "isPublic": true,
    "likes": "string",
    "tags": [
      "string"
    ],
    "permissions": {
      "canEdit": true
    },
    "tasks": []
  },
  "assetId": "string",
  "meta": {}
}

Was this page helpful?