Model

Generative a new model

Generative model.

POST https://api.myapi.com/open-api/sumeru/sdk/model/generate

Generate a 3D virtual human from a photo

Headers

Name
Type
Description

auth_ak*

String

Your API key

Content-Type*

String

multipart/form-data

Request Body

Name
Type
Description

file*

File

Portrait photo file

sex*

Integer

Virtual Human Nature, Input number:

1 :Female

0 :Male

eyelidType

Integer

Eyelid type, Input number:

1: Single eyelid

2: Double eyelid

{
    "data": {
        "waitTime":30,
        "modelId":"22223698866223744"
    },
    "code": 200,
    "message": "success"
}

data Object The specific object returned

  • waitTime Integer Estimated waiting time (seconds)

  • modelId String Model Unique Identification

code Integer The status identifier returned by the request, with 200 indicating success and others indicating failure

message String The prompt information returned by the interface

Good to know: This API method was created using the API Method block, it's how you can build out an API method documentation from scratch. Have a play with the block and you'll see you can do some nifty things like add and reorder parameters, document responses, and give your methods detailed descriptions.

Get a model

Get a model info

GET https://api.myapi.com//open-api/sumeru/sdk/model/get/{modelId}

Obtain model information through modelID

Path Parameters

Name
Type
Description

modelId*

String

Model unique identifier

{
    "data": {
        "status": 1,
        "waitTime": null,
        "sex": 1,
        "eyelidType": null,
        "failMessage": null,
        "downloadLink": "https://file.sumeruai.com/files/models/916f7cc946d742d684d9a6c2a8d826ea.npz"
    },
    "code": 200,
    "message": "request success"
}

data Object The specific object returned

  • status Integer Generate status code: 1 - success, 3 - Processing, 4 - Fail

  • waitTime String Estimated waiting time (seconds)

  • sex Integer Virtual Human Nature: 1 - Female, 0 - Male

  • eyelidType Integer Eyelid type: 1 - Single eyelid, 2 - Double eyelid

  • failMessage String If the model generation fails, the reason for the failure will be displayed here

  • downloadLink String If generated successfully, the model download link will be displayed here

code Integer The status identifier returned by the request, with 200 indicating success and others indicating failure

message String The prompt information returned by the interface

Good to know: This API method was auto-generated from an example Swagger file. You'll see that it's not editable – that's because the contents are synced to a URL! Any time the linked file changes, the documentation will change too.

最后更新于

这有帮助吗?