---
updatedAt: 2025-03-02T09:38:19.000Z
agentTools:
  projectIndex: https://docs.writesonic.com/llms.txt
---

# Stories

<b> Engaging and persuasive stories that will capture your reader's attention and interest. </b>

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Writesonic Docs",
    "description": "This is the documentation for Writesonic's API. To be able to test the API, please register an account and request an api key at [Writesonic](https://writesonic.com). <br/> Please check out the tutorials section for more information<br/> <ul> <li> [Find your API key](../docs/Find%20Api%20Key) </li> <li>[Test an endpoint](../docs/Test%20An%20Endpoint)</li></ul> <p> Writesonic API has been upgraded to V2(beta) version. [Click here to read V2 docs (beta)](../api-docs/v2.html) <br/> Note - as all APIs are backwards-compatible, old endpoints will not be impacted by this change. </p> For any queries write us to at support@writesonic.com",
    "contact": {
      "email": "support@writesonic.com"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.writesonic.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/v2/business/content/story-generation": {
      "post": {
        "tags": [
          "v1"
        ],
        "summary": "Stories",
        "description": "\n\n<b> Engaging and persuasive stories that will capture your reader's attention and interest. </b>\n\n",
        "operationId": "story-generation_/v2/business/content/story-generation_post",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Engine",
              "enum": [
                "economy",
                "average",
                "good",
                "premium"
              ],
              "type": "string"
            },
            "name": "engine",
            "in": "query"
          },
          {
            "required": true,
            "schema": {
              "title": "Language",
              "enum": [
                "en",
                "nl",
                "fr",
                "de",
                "it",
                "pl",
                "es",
                "pt-pt",
                "pt-br",
                "ru",
                "ja",
                "zh",
                "bg",
                "cs",
                "da",
                "el",
                "hu",
                "lt",
                "lv",
                "ro",
                "sk",
                "sl",
                "sv",
                "fi",
                "et"
              ],
              "type": "string"
            },
            "name": "language",
            "in": "query"
          },
          {
            "required": true,
            "schema": {
              "title": "Number of Copies",
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            },
            "name": "num_copies",
            "in": "query"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InputStoryGeneration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Google Ads V1 Business Content Google Ads Post",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OutputStoryGeneration"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "InputStoryGeneration": {
        "title": "InputStoryGeneration",
        "required": [
          "description",
          "tone_of_voice"
        ],
        "type": "object",
        "properties": {
          "description": {
            "title": "Description",
            "maxLength": 600,
            "minLength": 5,
            "type": "string"
          },
          "tone_of_voice": {
            "title": "Tone Of Voice",
            "maxLength": 100,
            "minLength": 0,
            "type": "string"
          }
        },
        "example": {
          "description": "Robert Bruce was the king of Scotland, who was at war with England. Scotland lost all 6 battles against England. One day, a disheartened Robert sees a spider trying to weave her web but failing again and again. Seeing the spider's perseverance, Robert feels motivated again.",
          "tone_of_voice": "Inspirational"
        }
      },
      "OutputStoryGeneration": {
        "title": "OutputStoryGeneration",
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "title": "Text",
            "minLength": 1,
            "type": "string"
          }
        },
        "example": null
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        },
        "example": null
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "example": null
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```