> For the complete documentation index, see [llms.txt](https://julianbuse007.gitbook.io/upstash-js/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://julianbuse007.gitbook.io/upstash-js/custom-query.md).

# Custom Query

```typescript
import Upstash from "upstash.js"

const upstash = new Upstash()

//result has any type
const [result, error] = await upstash.custom("set", "key", "value")

//result has type number, useful if you use typescript.
const [result, error] = await upstash.custom<number>("strlen", "key")
```

If you want to execute a command that we haven't implemented yet, you can also run your own commands, with the custom method.
