TSWG AI API Docs

Documentation for AI, media generation, workflow automation, and payment-ready API products.

Execution endpoints require paid access, provider configuration, proof review, and payment activation. Public documentation explains the product architecture without exposing secrets.

Workflow Automation API

Category: Automation

Manual processes automated: Copy-paste admin work, manual follow-up, spreadsheet tracking, asset approvals, repetitive reporting.

Workflow: Trigger → data capture → API action → review gate → delivery → proof report.

POST /api/v1/workflows/run | GET /api/v1/workflows/{id} | POST /api/v1/webhooks

Payment readiness: Paid API access. Payment implementation must support global/local gateway routing after checkout inspection.

AI Avatar Creation API

Category: Generative AI

Manual processes automated: Manual filming, repeated introductions, onboarding videos, basic sales explanation, FAQ narration.

Workflow: Input brief → avatar style → script → render request → proof review → publish/use via API.

POST /api/v1/avatar/create | GET /api/v1/avatar/{id} | POST /api/v1/avatar/render

Payment readiness: Paid API access. Payment must route through TSWG-approved global/local payment gateway after payment inspection pass.

Text-to-Audio API

Category: Generative AI

Manual processes automated: Manual recording, voiceover booking, first-draft narration, repetitive support audio, lesson audio.

Workflow: Script → voice selection → render → review → export/deliver via API.

POST /api/v1/audio/generate | GET /api/v1/audio/{id} | POST /api/v1/audio/voices

Payment readiness: Paid API access with usage-based limits and future country-local payment routing.

Text-to-Image API

Category: Generative AI

Manual processes automated: Manual moodboards, first-draft visual design, image variations, thumbnail concepts, ad creative drafts.

Workflow: Prompt → style settings → generation → variation → proof screenshot → asset delivery.

POST /api/v1/images/generate | GET /api/v1/images/{id} | POST /api/v1/images/variations

Payment readiness: Paid API access with usage metering and country-aware payment layer after payment inspection.

Text/Image-to-Video API

Category: Generative AI

Manual processes automated: Manual editing, scene planning, storyboarding, simple product demos, content repurposing.

Workflow: Prompt/image → scene plan → render → caption/audio → review → API delivery.

POST /api/v1/videos/generate | POST /api/v1/videos/from-image | GET /api/v1/videos/{id}

Payment readiness: Paid API access. Payment and local-currency collection require gateway configuration after inspection.

Global + Local Payments API

Category: Payments

Manual processes automated: Manual invoices, bank confirmations, WhatsApp payment checks, manual activation after payment.

Workflow: Country detect → payment method display → checkout → webhook verify → API access activate → invoice/receipt.

POST /api/v1/payments/intent | POST /api/v1/payments/webhook | GET /api/v1/payments/status

Payment readiness: Inspection-only for now: live checkout/payment wiring must be separate and gateway-specific.

Payment implementation rule

Do not wire live all-country payment processing without a dedicated payment inspection and gateway test pass. Required inspection: existing checkout, wallet, payment tables, webhooks, country/currency handling, local payment providers, rollback, and sandbox/live mode separation.

Provider execution and proof review workflow

Requests enter the paid AI API queue first. Admin can review, assign provider / model, attach output URLs, mark requests as processing / completed / failed, and require proof before any public result claim is used.

Admin queue: admin/default/sources/contents/tswg_ai_api_requests.php
Action endpoint: /admin/tswg_ai_api_request_action.php
Status endpoint: GET /tswg-ai-api.php?action=status&id=REQUEST_ID
Proof rule: output is not a proven result until proof is reviewed and approved.