# Response Output Example

> Learn to customize API outputs using g.res.output in API Maker, including success messages and data wrapping.

Source: https://docs.apimaker.dev/v1/examples/res/output/output.html

### Set response output.

```ts
g.res.output = {'hello':'world'};
```

Response
```json
{
    "success": true,
    "statusCode": 200,
    "data": {
        "hello": "world"
    }
}
```

## Related

- [The global object g](https://docs.apimaker.dev/v1/docs/pre-defined-terms/global-object-g.html) · [Custom APIs](https://docs.apimaker.dev/v1/docs/apis-all/custom-apis/user-created-custom-api.html)
