SOKE
API ReferenceContent

Optimize Title

Generate AI-optimized title alternatives scored for click-through performance.

POST /api/v1/content/optimize-title

Generate AI-optimized title alternatives for your content. Each alternative is scored for click-through potential, keyword placement, and emotional appeal.

Credits: 3 per request

Authentication

X-Soke-Key: sk_live_your_api_key
Authorization: Bearer your_jwt_token

Request Body

FieldTypeRequiredDefaultDescription
draftTitlestringYesYour draft title to optimize
platformstringNo"youtube"Target platform
nichestringNoContent niche for context
keywordsstring[]NoTarget keywords to incorporate
keywordsWithScoresobject[]NoKeywords with competition data (from keyword research)
keywordsWithScores[].keywordstringThe keyword
keywordsWithScores[].competitionScorenumberCompetition score (0-1)
keywordsWithScores[].trendDirectionstringTrend direction

Example Request

curl -X POST https://api.usesoke.ai/api/v1/content/optimize-title \
  -H "Content-Type: application/json" \
  -H "X-Soke-Key: sk_live_your_api_key" \
  -d '{
    "draftTitle": "How to be productive as a developer",
    "platform": "youtube",
    "niche": "tech",
    "keywords": ["developer productivity", "coding tips"]
  }'

Response

200 OK
{
  "success": true,
  "data": {
    "originalTitle": "How to be productive as a developer",
    "alternatives": [
      {
        "title": "10 Developer Productivity Hacks That Actually Work",
        "score": 87.5,
        "reasoning": "Strong number hook, includes target keyword, curiosity gap"
      },
      {
        "title": "Why Most Developers Are Unproductive (And How to Fix It)",
        "score": 82.0,
        "reasoning": "Negative hook creates curiosity, promises solution"
      }
    ]
  },
  "meta": {
    "platform": "youtube",
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "processing_time_ms": 2100
  }
}

Error Codes

CodeStatusDescription
BAD_REQUEST400Missing or invalid draftTitle
RATE_LIMIT_EXCEEDED429Rate limit exceeded
INSUFFICIENT_CREDITS402Not enough credits
PLATFORM_NOT_IMPLEMENTED501Platform not yet supported

On this page