# NewKey API

This API creates a new account (i.e. a private key/address pair), and encrypts the private key under \~/.scriptcli/keys/encrypted/ by default.

**RPC Method:** scriptcli.NewKey

**Query Parameters**

password: the password for the new account

**Returns**

address: the address of the newly created account

`// Request`

`curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"scriptcli.NewKey","params":[{"password":"qwertyuiop"}],"id":1}' http://localhost:16889/rpc`

`// Result`

`{`

&#x20;`"jsonrpc": "2.0",`

&#x20;`"id": 1,`

&#x20;`"result": {`

&#x20;`"address": "0x8318dd49f83A2684E30d5fB50cD0D3D69aA82EAd"`

&#x20;`}`

`}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.script.tv/api-references/scriptcli-apis/account-apis/newkey-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
