# Custom API

## Setting a custom API option

Custom API is represented as an object composed of **asynchronous** methods that you set on your Appmixer SDK instance using the `api` option:

```javascript
var myCustomApi = {
  /* the key must match an existing API method */
  myCustomApiMethod(/* arguments of the original method */) {
    return new Promise((resolve) => {
      resolve(myCustomResponse);
    });
  }
}

/* Use a custom API on the entire SDK instance */
var appmixer = new Appmixer({ api: myCustomApi });

/* Use a custom API on a particular SDK UI widget */
var designer = new appmixer.ui.Designer({ api: myCustomApi });
```

The list of API methods can be found here.

{% content-ref url="../appmixer-sdk/api-reference/api" %}
[api](https://docs.appmixer.com/6.0/v4/appmixer-sdk/api-reference/api)
{% endcontent-ref %}
