Content Generation API

POST Content Generation API

/api/v1/ai/content/generate

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
type string Optional Content type such as blog_post, social_caption, email
tone string Optional Tone style such as professional, friendly, persuasive
length string Optional Output size: short, medium, or long

Example Request

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

Example Response

JSON Response
{
  "success": true,
  "data": {
    "result": {
      "content": "We just launched RS FlowHub APIs to help teams ship AI features faster...",
      "word_count": 54
    }
  },
  "meta": {
    "credits_used": 3,
    "credits_remaining": 996
  }
}

SDK Examples

Use the same endpoint with JavaScript, Python, or PHP.

cURL
curl -X POST 'https://rsflowhub.com/api/v1/ai/content/generate' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "Write a launch announcement for our new AI API platform",
    "type": "social_caption",
    "tone": "professional",
    "length": "medium"
}'
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.