> For the complete documentation index, see [llms.txt](https://developer.rpggo.ai/dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.rpggo.ai/dev-docs/creator-api/v2-api/create-character.md).

# Create Character

### 1. Create a character with L-GOS schema

> Note we only accepts the character data on L-GOS schema.

`POST` <https://api.rpggo.ai/v2/character/create>

**Request Body**

same as <https://github.com/RPGGO-AI/l-gos-spec/blob/main/schema_v1/character_v1.md>

<table><thead><tr><th>Name</th><th>Type</th><th width="137">Example Value</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>"📒 Sample: Dungeon Master"</td><td></td></tr><tr><td>avatar_url</td><td>String</td><td>"https://a.com/xxx.jpg"</td><td>http image url</td></tr><tr><td>background</td><td>String</td><td>"Play a text-based dungeon crawler game. You are the game designer, dungeon master, and host for the game session. I am The player. use the DND 5E system."</td><td></td></tr><tr><td>appearance</td><td>String</td><td>"A dungeon master"</td><td></td></tr><tr><td>traits</td><td>Array</td><td>["Confident", "Creative", "Drama"]</td><td></td></tr><tr><td>tone</td><td>Array</td><td>["Drama"]</td><td></td></tr><tr><td>intro</td><td>String</td><td>"Welcome to my Tavern, Traveler. This is the DND 5E playground."</td><td></td></tr><tr><td>tags</td><td>Array</td><td>["Male", "Game", "Serious", "Narration"]</td><td>See the tags definitions  here: [L-GOS Tags](<a href="https://github.com/RPGGO-AI/l-gos-spec/blob/main/schema_v1/tag_v1.md">https://github.com/RPGGO-AI/l-gos-spec/blob/main/schema_v1/tag_v1.md</a>)<br><br>Just fill in the value under the specific type, case-insensitive<br><br>Only one value can be selected for each type</td></tr><tr><td>opening_line</td><td>String</td><td>"I'm thrilled to be your Dungeon Master for this thrilling journey. Before we begin, let me clarify a few things. Since we are in a text-based format, I'll be controlling the pacing and describing the scenes."</td><td></td></tr><tr><td>creator</td><td>String</td><td>"Your-RPGGO-ID"</td><td>It must be your own user ID, otherwise the character will not appear in your creator tool list</td></tr><tr><td>creator_notes</td><td>String</td><td>""</td><td></td></tr><tr><td>modules</td><td>Array</td><td>[]</td><td>Not supported yet, can be null</td></tr><tr><td>publish_status</td><td>String</td><td>"opensource"</td><td>Optional parameters： opensource published unpublished</td></tr></tbody></table>

{% code title="Sample Curl" lineNumbers="true" %}

```bash
curl --location --request POST 'https://api.rpggo.ai/v2/character/create' \
--header 'Authorization: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  {
    "name": "📒 Sample: Dungeon Master",
    "avatar_url": "xxx.jpg",
    "background": "Play a text-based dungeon crawler game. You are the game designer,  dungeon master, and host for the game session. I am The player. use the DND 5E system.",
    "appearance": "A dungeon master",
    "traits": [
        "Confident",
        "Creative",
        "Drama"
    ],
    "tone": [
        "Drama"
    ],
    "intro": "Welcome to my Tavern, Traveler. This is the DND 5E playground.",
    "tags": [
        "Male",
        "Game",
        "Serious",
        "Narration"
    ],
    "opening_line": "Im thrilled to be your Dungeon Master for this thrilling journey. Before we begin, let me clarify a few things. Since we are in a text-based format, will be controlling the pacing and describing the scenes.",
    "creator": "my_rpggo_user_id",
    "creator_notes": "",
    "modules": [],
    "publish_status": "opensource"
  }
}'
```

{% endcode %}

{% tabs %}
{% tab title="200: OK " %}
{% code lineNumbers="true" %}

```json
{
    "code": 200,
    "message": "success",
    "data": "CN8J7VFR5OB"
}
```

{% endcode %}
{% endtab %}

{% tab title="10000008: Unauthorized " %}

```json
{
    "code": 10000008,
    "message": "Authentication failed，Invalid token"
}
```

{% endtab %}

{% tab title="10000000: Low balance" %}

```json
{​
    "code": 10000000,​
    "message": "user balance is not enough"​
}
```

{% endtab %}
{% endtabs %}

After creating the character succesfully, you will be able to see your character in the \[Creator Tool]\(<https://creator.rpggo.ai/>)

<figure><img src="/files/0uvRsgPL3CS9I3eL1fXF" alt=""><figcaption></figcaption></figure>
