Developer API Reference

Complete reference for the Kowhai Text Utilities API. Build faster with AI prompt optimization, JSON tooling, and text analysis.

Authentication

All requests require a RapidAPI key in the X-RapidAPI-Key header. Subscribe to any plan (including the free BASIC tier) to get your key.

Required headers
X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
X-RapidAPI-Host: api.kowhaigoods.com
Content-Type: application/json

Base URL: https://api.kowhaigoods.com

Endpoints

Five production-ready endpoints. All accept JSON and return JSON.

POST/prompt-optimizer/optimize

Optimize AI prompts for clarity, specificity, conciseness, or creativity.

ParameterTypeRequiredDescription
promptstringYesThe prompt text to optimize
goalstringNoclarity, conciseness, specificity, creativity (default: clarity)
contextstringNoAdditional context for the optimization
formatstringNoOutput format hint: markdown, json, plain
JSON request body
{
  "prompt": "write a blog post about climate change",
  "goal": "clarity",
  "context": "for a tech audience",
  "format": "markdown"
}
200 OK response
{
  "optimized_prompt": "Write a comprehensive blog post about climate change for a technical audience...",
  "improvements": [
    "Added specific structure requirements",
    "Included audience targeting",
    "Specified output format"
  ],
  "original_length": 38,
  "optimized_length": 285
}
Python
import requests

url = "https://api.kowhaigoods.com/prompt-optimizer/optimize"
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "api.kowhaigoods.com",
    "Content-Type": "application/json"
}
payload = {
    "prompt": "write a blog post about climate change",
    "goal": "clarity"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript / fetch
const options = {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'api.kowhaigoods.com',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'write a blog post about climate change',
    goal: 'clarity'
  })
};

fetch('https://api.kowhaigoods.com/prompt-optimizer/optimize', options)
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));
cURL
curl -X POST https://api.kowhaigoods.com/prompt-optimizer/optimize \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: api.kowhaigoods.com" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"write a blog post about climate change","goal":"clarity"}'
POST/json-tools/validate

Validate JSON strings against a JSON Schema. Returns detailed error messages if validation fails.

ParameterTypeRequiredDescription
jsonstringYesThe JSON string to validate
schemaobjectNoJSON Schema to validate against
JSON request body
{
  "json": "{\"name\":\"John\",\"age\":30}",
  "schema": {
    "type": "object",
    "required": ["name", "age"],
    "properties": {
      "name": {"type": "string"},
      "age": {"type": "integer", "minimum": 0}
    }
  }
}
200 OK response
{
  "valid": true,
  "errors": [],
  "parsed": {
    "name": "John",
    "age": 30
  }
}
Python
import requests

url = "https://api.kowhaigoods.com/json-tools/validate"
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "api.kowhaigoods.com",
    "Content-Type": "application/json"
}
payload = {
    "json": '{"name":"John","age":30}',
    "schema": {
        "type": "object",
        "required": ["name", "age"],
        "properties": {
            "name": {"type": "string"},
            "age": {"type": "integer", "minimum": 0}
        }
    }
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript / fetch
const options = {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'api.kowhaigoods.com',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    json: '{"name":"John","age":30}',
    schema: { type: 'object', required: ['name', 'age'] }
  })
};

fetch('https://api.kowhaigoods.com/json-tools/validate', options)
  .then(res => res.json())
  .then(data => console.log(data));
cURL
curl -X POST https://api.kowhaigoods.com/json-tools/validate \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: api.kowhaigoods.com" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"name\":\"John\",\"age\":30}","schema":{"type":"object","required":["name","age"]}}'
POST/json-tools/format

Format and prettify JSON strings. Supports custom indentation or minified output.

ParameterTypeRequiredDescription
jsonstringYesThe JSON string to format
indentintegerNoSpaces per indentation level (default: 2)
minifybooleanNoIf true, output minified JSON (default: false)
JSON request body
{
  "json": "{\"name\":\"John\",\"age\":30,\"hobbies\":[\"reading\",\"coding\"]}",
  "indent": 2,
  "minify": false
}
200 OK response
{
  "formatted": "{\n  \"name\": \"John\",\n  \"age\": 30,\n  \"hobbies\": [\n    \"reading\",\n    \"coding\"\n  ]\n}",
  "size": 72,
  "valid": true
}
Python
import requests

url = "https://api.kowhaigoods.com/json-tools/format"
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "api.kowhaigoods.com",
    "Content-Type": "application/json"
}
payload = {
    "json": '{"name":"John","age":30,"hobbies":["reading","coding"]}',
    "indent": 2,
    "minify": False
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript / fetch
const options = {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'api.kowhaigoods.com',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    json: '{"name":"John","age":30,"hobbies":["reading","coding"]}',
    indent: 2,
    minify: false
  })
};

fetch('https://api.kowhaigoods.com/json-tools/format', options)
  .then(res => res.json())
  .then(data => console.log(data));
cURL
curl -X POST https://api.kowhaigoods.com/json-tools/format \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: api.kowhaigoods.com" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"name\":\"John\",\"age\":30,\"hobbies\":[\"reading\",\"coding\"]}","indent":2,"minify":false}'
POST/json-tools/convert

Convert JSON to CSV, YAML, or reformatted JSON for data pipelines.

ParameterTypeRequiredDescription
jsonstringYesThe JSON string to convert
target_formatstringYesTarget format: csv, yaml, or json
JSON request body
{
  "json": "[{\"name\":\"John\",\"age\":30},{\"name\":\"Jane\",\"age\":25}]",
  "target_format": "csv"
}
200 OK response
{
  "converted": "name,age\nJohn,30\nJane,25\n",
  "source_format": "json",
  "target_format": "csv",
  "rows": 2
}
Python
import requests

url = "https://api.kowhaigoods.com/json-tools/convert"
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "api.kowhaigoods.com",
    "Content-Type": "application/json"
}
payload = {
    "json": '[{"name":"John","age":30},{"name":"Jane","age":25}]',
    "target_format": "csv"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript / fetch
const options = {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'api.kowhaigoods.com',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    json: '[{"name":"John","age":30},{"name":"Jane","age":25}]',
    target_format: 'csv'
  })
};

fetch('https://api.kowhaigoods.com/json-tools/convert', options)
  .then(res => res.json())
  .then(data => console.log(data));
cURL
curl -X POST https://api.kowhaigoods.com/json-tools/convert \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: api.kowhaigoods.com" \
  -H "Content-Type: application/json" \
  -d '{"json":"[{\"name\":\"John\",\"age\":30},{\"name\":\"Jane\",\"age\":25}]","target_format":"csv"}'
POST/text-analyzer/analyze

Analyze text for readability metrics, SEO quality, and content statistics.

ParameterTypeRequiredDescription
textstringYesThe text to analyze
include_seobooleanNoInclude SEO analysis (default: false)
strip_htmlbooleanNoStrip HTML tags before analysis (default: false)
JSON request body
{
  "text": "The quick brown fox jumps over the lazy dog. This is a sample text for analysis.",
  "include_seo": true,
  "strip_html": false
}
200 OK response
{
  "word_count": 16,
  "sentence_count": 2,
  "character_count": 79,
  "reading_time_seconds": 7,
  "complexity_score": 3.2,
  "readability": "easy",
  "seo": {
    "keyword_density": {
      "the": 3.1,
      "text": 6.2,
      "sample": 6.2
    },
    "meta_description_length": 0,
    "title_length": 0,
    "recommendations": [
      "Add a meta description of at least 120 characters",
      "Consider adding more relevant keywords"
    ]
  }
}
Python
import requests

url = "https://api.kowhaigoods.com/text-analyzer/analyze"
headers = {
    "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY",
    "X-RapidAPI-Host": "api.kowhaigoods.com",
    "Content-Type": "application/json"
}
payload = {
    "text": "The quick brown fox jumps over the lazy dog. This is a sample text for analysis.",
    "include_seo": True,
    "strip_html": False
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript / fetch
const options = {
  method: 'POST',
  headers: {
    'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
    'X-RapidAPI-Host': 'api.kowhaigoods.com',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    text: 'The quick brown fox jumps over the lazy dog. This is a sample text for analysis.',
    include_seo: true,
    strip_html: false
  })
};

fetch('https://api.kowhaigoods.com/text-analyzer/analyze', options)
  .then(res => res.json())
  .then(data => console.log(data));
cURL
curl -X POST https://api.kowhaigoods.com/text-analyzer/analyze \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: api.kowhaigoods.com" \
  -H "Content-Type: application/json" \
  -d '{"text":"The quick brown fox jumps over the lazy dog. This is a sample text for analysis.","include_seo":true,"strip_html":false}'

Pricing

Choose a plan that fits your volume. All paid plans include 10,240 MB/month bandwidth.

Free

$0/mo
  • 500 requests/day
  • Hard quota limit
  • All 5 endpoints
  • 10,240 MB bandwidth/mo

Ultra

$29.99/mo
  • 1,000 requests/hour
  • 500,000 requests/month
  • All 5 endpoints
  • 10,240 MB bandwidth/mo

Mega

$99.99/mo
  • 1,000 requests/hour
  • 500,000 requests/month
  • All 5 endpoints
  • 10,240 MB bandwidth/mo
  • Overage: $0.001/MB

Error Handling

Standard HTTP status codes with JSON error bodies.

StatusMeaning
200 OKRequest succeeded.
400 Bad RequestInvalid input — check the error message in the response body.
429 Too Many RequestsRate limit exceeded — upgrade your plan or wait for quota reset.
500 Internal Server ErrorServer error — retry with exponential backoff.
Error response format
{
  "error": "Invalid JSON input",
  "detail": "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"
}

Try It

Build a ready-to-run cURL command. Paste your RapidAPI key, pick an endpoint, and edit the request body.