# Quick Start

{% hint style="info" %}
**Good to know:** A quick start guide can be good to help folks get up and running with your API in a few steps. Some people prefer diving in with the basics rather than meticulously reading every page of documentation!
{% endhint %}

## Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from your **Studio** at any time.

## Make your first request

To make your first request, send an authenticated request to the models endpoint. This will generate a `model`, The generation process takes approximately 3 minutes. After generation, you can call the [**Get Model** ](https://doc.sumeruai.com/reference/api-reference/model#get-a-model)interface to obtain the download link

## Generative model.

<mark style="color:green;">`POST`</mark> `https://api.myapi.com/open-api/sumeru/sdk/model/generate`

Generate a 3D virtual human from a photo

#### Headers

| Name                                           | Type   | Description         |
| ---------------------------------------------- | ------ | ------------------- |
| auth\_ak<mark style="color:red;">\*</mark>     | String | Your API key        |
| Content-Type<mark style="color:red;">\*</mark> | String | multipart/form-data |

#### Request Body

| Name                                   | Type    | Description                                                                                                                    |
| -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| file<mark style="color:red;">\*</mark> | File    | Portrait photo file                                                                                                            |
| sex<mark style="color:red;">\*</mark>  | Integer | <p>Virtual Human Nature, Input number:</p><p><strong>1</strong> :Female</p><p><strong>0</strong> :Male</p>                     |
| eyelidType                             | Integer | <p>Eyelid type, Input number:</p><p> <strong>1</strong>: Single eyelid</p><p> <strong>2</strong>: Double eyelid</p><p><br></p> |

{% tabs %}
{% tab title="200 Model Successfully generated" %}

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

{% endtab %}
{% endtabs %}

## Responses Object

The response object returned by the request generation model

```json
{
    "data": null,
    "code": 500,
    "message": "The photo does not recognize a face or has an incorrect photo format"
}
```

**data**  <mark style="color:orange;">Object</mark>  \
The specific object returned

* **waitTime**  <mark style="color:orange;">Integer</mark>\
  \&#xNAN;*Estimated waiting time (seconds)*
* **modelId**  <mark style="color:orange;">String</mark>\
  \&#xNAN;*Model Unique Identification*

**code**  <mark style="color:orange;">Integer</mark> \
The status identifier returned by the request, with *200* indicating success and others indicating failure

**message**  <mark style="color:orange;">String</mark> \
The prompt information returned by the interface

{% hint style="info" %}
**Good to know:** You can use the API Method block to fully document an API method. You can also sync your API blocks with an OpenAPI file or URL to auto-populate them.
{% endhint %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```
curl https://api.myapi.com/v1/pet  
    -u YOUR_API_KEY:  
    -d name='Wilson'  
    -d species='dog'  
    -d owner_id='sha7891bikojbkreuy'  
```

{% endtab %}
{% endtabs %}
