Content Generation API

POST Content Generation API

/api/v1/ai/content-generation

Generate marketing copy, blogs, social captions, and product content from a short prompt.

Request Body Parameters

Field Type Required Description
prompt string Required Instruction or writing prompt (Max: 15,000 characters)
tone string Optional Tone style such as "professional", "friendly", "persuasive" (Max: 50 chars)
format string Optional Content format such as "blog_post", "social_caption", "email" (Max: 50 chars)
audience string Optional Target audience for the content (e.g., "developers", "teenagers") (Max: 100 chars)
Important Note on Credit Usage

All fields you pass in the request (such as prompt, tone, format, and audience) are sent to the AI and count towards your total Content Size (Input Characters). Additionally, the generated content length affects output billing. Be mindful of passing excessively long prompts to avoid higher processing credit costs.


Example Request

JSON Request
{
  "prompt": "Write a launch announcement for our new AI API platform.",
  "format": "social_caption",
  "tone": "professional",
  "audience": "developers"
}
cURL
curl -X POST https://rsflowhub.com/api/v1/ai/content-generation \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a launch announcement for our new AI API platform.",
    "format": "social_caption",
    "tone": "professional",
    "audience": "developers"
  }'

Example Response

JSON Response
{
  "success": true,
  "data": {
    "result": {
      "content": "🚀 We are thrilled to launch RS FlowHub APIs! Build AI features into your apps in minutes with our robust, pay-as-you-go infrastructure. Designed for developers who want to ship fast."
    }
  },
  "meta": {
    "credits_used": 6,
    "credits_remaining": 994
  }
}

API Request Example

Use the cURL snippet below to test the endpoint.

cURL
curl -X POST 'https://rsflowhub.com/api/v1/ai/content-generation' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "Write a launch announcement for our new AI API platform.",
    "format": "social_caption",
    "tone": "professional",
    "audience": "developers"
}'
Production usage
Store both your original prompt and generated output for auditing and quality iteration.

Ready to build?

Create your free account and make your first API call in minutes.