> For the complete documentation index, see [llms.txt](https://docs.sansar.com/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sansar.com/latest/creating-in-sansar/creatortools/building-with-an-ai-assistant.md).

# Build worlds with an AI assistant

Turn your world ideas into places you can explore, with help from an AI assistant.

Imagine a moonlit hangout, a neon arcade, or a gallery for your creations. Describe what you have in mind, and an AI assistant can help you put it together in Sansar. Then step inside, see how it feels, and ask for changes: "Make the lights warmer," "Give the entrance more space," or "Arrange these props around the stage."

Sansar's **editing and publishing API** gives assistants a way to work directly with the Sansar client on your PC. An API is simply a way for programs to talk to each other. You bring the idea and choose what feels right; your assistant handles the technical steps.

## What could you make?

An assistant can help you:

* **Set the scene.** Find items in your inventory, place and arrange objects, and adjust their size and rotation.
* **Create a mood.** Change lighting, colors, materials, and scene settings.
* **Bring in your own creations.** Import supported models from Blender, such as buildings, furniture, and props. If your assistant can also work with Blender, it can help prepare those models.
* **Add a little life.** Write and attach scripts for behaviors such as a spinning display or an interactive prop.
* **Refine the result.** Capture views, review changes, and build a world you can visit and test yourself.
* **Get ready to share.** Help set up a world image, listing, and visitor access when you are happy with your creation.

You don't need to write code to ask for these things. Start small, try an idea, and keep shaping it together.

## Get ready

1. **Update Sansar on your Windows PC**, open it, and log in as usual.
2. **Check local access.** In Sansar, open **Settings > SOCIAL > Privacy** and make sure **Allow local API access** is on. It is on by default. This lets programs running under your Windows account work with your client; you can turn it off in the same place.
3. **Use an assistant that can work on that PC.** It needs to be able to read local files and run programs. A chat window that only gives advice cannot make changes in Sansar for you.
4. **Choose some starting content.** You can use a scene you already own. If you need one, follow [Creating a World](/latest/creating-in-sansar/creatortools/creating-a-world.md) to make a starting world from a template. Your assistant can copy its scene for your project.

Sansar includes the connection tool, **SansarCli**, and its technical guides with the client. Your assistant can find and use them for you. Blender is optional unless your project needs new models made or prepared there.

## Copy this prompt to your assistant

Replace the idea at the end with your own. You can be specific about a style, a few favorite colors, or what you want your friends to do there.

```
Help me build a world in Sansar using its local editing and publishing API.

Find the installed SansarCli.exe next to SansarClient.exe. Its guides are
in the AuthoringApi folder beside it. Use the bundled tool and docs for
my installed version. Start with SansarCli help, help readme, help config,
help features, and help quickstart. Read help recovery if work gets stuck.

Use SansarCli instances list, context, and api describe to check the
running client, my account, and the features available now. If several
clients are running, ask me which to use. If access is off or I need to
log in, guide me through that.

Ask which starting scene to use, then work in a new copy. Follow the
bundled guidance to create a separate private, unlisted test world and
confirm that builds target it. Keep my original scene and world intact.
Never discard unsaved work or delete my existing content without asking.

Help me turn my idea into a small first version. Explain your plan in
plain language, use supported features, and tell me if something isn't
available. Capture views so we can review and refine it. Check the floor
and spawn point (where visitors arrive) before building. Save and build
the test world, then help me visit it to check the look and interactions.

Ask before building into a world other than our new test world or
changing who can find or visit a world. When I'm ready to share, help me
choose its listing and access settings, and get my approval before
publishing those changes.

My idea: A cozy moonlit rooftop hangout with warm lights, a few seating
areas, and a slowly spinning sculpture in the center.
```

## Try it, then make it yours

Treat the first version as something to play with. Visit it, look around, and give your assistant feedback in your own words:

* "Move the sculpture so it is the first thing visitors see."
* "Make the lighting feel more like sunset."
* "Spread the furniture out so my friends have more room."

Walk through the space yourself, too. A screenshot can show the mood, but visiting helps you check whether entrances, floors, and interactive objects work the way you expect.

## When you're ready to share

There are three steps to know:

* **Save** keeps your scene edits.
* **Build** turns the saved scene into the playable version and updates its attached world immediately. If that world already has visitors, this changes the version they enter.
* **Publish** controls who can find and visit the world. It does not build your latest scene edits.

That is why the starter prompt uses a separate private, unlisted test world: only you can visit it, and it does not appear in the public directory. Once you are happy with it, ask your assistant to help you choose an image and description, decide who can visit, and share it.

## Want to see what the API can do?

Ask your assistant: "Show me what my installed Sansar API supports, in plain language."

<details>

<summary>Explore the built-in help</summary>

Your assistant can run these commands using the installed `SansarCli.exe`. You can also run them from its installation folder in PowerShell, using `./SansarCli.exe` in place of `SansarCli`.

```
SansarCli help features
SansarCli help quickstart
SansarCli help commands
SansarCli api describe
```

The first two explain supported features and a worked example. `help commands` lists the commands included with the tool; `api describe` checks what your running client actually offers. The full guides and examples live in the `AuthoringApi` folder next to it, so they travel with your client version.

For example, the Blender import workflow supports static models such as scenery and props. Rigged avatars and Blender animations are outside that workflow. Have your assistant check the installed feature guide before planning a project around a particular capability.

</details>
