API Reference
The hub is an OpenAI-compatible REST API. The WordPress plugin uses it under the hood — you can also call it directly.
Base URL & authentication
BASE_URL = https://onlyaiseo.com/wp-json/onlyai-hub/v1
# Every request needs this header:
Authorization: Bearer hub_YOUR_API_KEY
# Optional: identifies the calling site (shown in your dashboard)
X-Site-Url: https://mysite.comEndpoints
/pingHealth check. Verifies your key and the hub connection.
# GET /ping
# {"ok":true,"version":"1.0.0"}/accountYour plan, daily quota, usage today, and the site URL bound to this key.
# GET /account
# {"plan_name":"free","daily_limit":50,"requests_today":3,
# "usage_remaining":47,"site_url":"https://mysite.com"}/usageRequest and token counts for today and the last 30 days.
# GET /usage
# {"today":3,"today_tokens":1204,"month":41,"month_tokens":18320}/generateGenerate content from a prompt. Body: prompt (required), max_tokens (default 2000, max 4096), temperature (default 0.7), system_prompt (optional).
# POST /generate
# {"prompt":"Write a 300-word intro for a post about AI SEO"}
# {"content":"...","model":"deepseek/deepseek-chat",
# "tokens_used":412,"usage_remaining":47}/batchRun up to 5 prompts at once. Body: prompts (array of strings, max 5), max_tokens (default 1000).
# POST /batch
# {"prompts":["Write an H1","Write a meta description"]}
# {"results":[{"content":"...","tokens_used":120},...],
# "usage_remaining":47}/analyzeKeyword analysis with volume estimate, difficulty, trend, intent, long-tail suggestions, and top questions.
# POST /analyze
# {"keyword":"ai seo tools"}
# {"analysis":{"keyword":"ai seo tools",
# "search_volume_estimate":4400,"difficulty":32,"trend":"rising",
# "intent":"informational","suggestions":[...],"top_questions":[...]},
# "usage_remaining":47}/link-suggestionsSmart internal linking suggestions. Body: content (required).
# POST /link-suggestions
# {"content":"<article text>"}
# {"suggestions":[{"anchor_text":"...","target_topic":"...",
# "reason":"..."}],"model":"deepseek/deepseek-chat",
# "tokens_used":310,"usage_remaining":47}/repurposeRepurpose content into other formats. Body: content (required), formats (e.g. social_post, email, newsletter, meta_description, blog_intro, press_release; max 4).
# POST /repurpose
# {"content":"<article text>","formats":["social_post","email"]}
# {"results":[{"format":"social_post","content":"...",
# "suggested_title":"..."}],"model":"deepseek/deepseek-chat",
# "tokens_used":812,"usage_remaining":47}/image-altGenerate SEO alt text, caption, and filename. Body: description (required).
# POST /image-alt
# {"description":"A white laptop on a wooden desk with code on screen"}
# {"alt_text":"Laptop displaying code on a wooden desk",
# "caption":"...","filename_suggestion":"laptop-code-desk.jpg",
# "model":"deepseek/deepseek-chat","tokens_used":95,"usage_remaining":47}Errors
All errors return JSON with a message field:
# 400 Bad request (missing prompt/keyword, invalid JSON)
# 401 Missing or invalid API key
# 404 Unknown endpoint
# 429 Daily usage limit reached
# 502 AI provider error or timeout
# 503 Hub AI service not configured