---
title: synthetic
summary: null
url: https://www.fastly.com/documentation/reference/vcl/statements/synthetic
---

```
synthetic(STRING content);
```

**Available in:** error

The `synthetic` statement replaces the content of the cache object's response body with the specified string, when processing an error state.

Typically, synthetic responses are used to create customized error messages or responses to API calls, but can be used to serve full pages of content, and are often employed for site-wide metadata such as `robots.txt` files.

> **HINT:** To learn about using `synthetic` to deliver custom responses at the edge, see the `error` statement.

Being a `STRING`, if the `content` argument to the `synthetic` statement contains any null bytes (`0x00`), the first instance of a null byte will terminate the string. `synthetic` is therefore not a good choice for generating non-textual content, and you may prefer to use `synthetic.base64` instead.
