Developer API
Integrate AutoPersonas into your own applications and workflows with our REST API — 180+ endpoints to manage influencers, generate content, publish posts, create videos, and read analytics, all programmatically. Building an AI agent instead? Use the hosted MCP server, which wraps this same API.
Authentication
Mint a key in Settings > API Keys (open it here). Keys look like ap_live_ followed by 64 hex characters, and the full key is shown exactly once at creation — only a SHA-256 hash is stored, so copy it immediately. Pass it as a Bearer token in the Authorization header of every request:
Authorization: Bearer ap_live_...Keys are scoped — when creating a key, grant only the permissions it actually needs (see Scopes). You can revoke or rotate keys at any time from Settings; revocation takes effect immediately.
Generative endpoints additionally require billing setup (a payment method on file). Until then they return 403 with "error_code": "billing_required" and a remediation_url pointing at Settings > Billing.
Base URL
https://autopersonas.com/api/v1Every successful response is wrapped in a data envelope: { "data": ... }. Errors return { "error": "message" } with a non-2xx status.
A quick way to verify a key: GET /api/v1/me requires no scope and returns your key's metadata, scopes, and current rate-limit state.
Rate Limits
- 60 requests per minute per API key (sliding window; the default — a key's limit can differ).
- Every response includes
X-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Reset(unix seconds) headers. - Exceeding the limit returns
429 Too Many Requests. Back off and retry after the reset time.
Scopes
Each API key is assigned one or more scopes that determine what it can access. A request to an endpoint whose scope the key lacks returns 403.
| Scope | Description |
|---|---|
character:read | List and view influencers, previews, and character data |
character:write | Create, update, delete influencers; manage references, wardrobe, and voice |
profile:read | List and view profiles and their settings |
profile:write | Create, update, delete profiles; edit posting schedules |
content:read | List content items, batches, and import/job status |
content:write | Update, delete, approve, reject, upload, and reschedule content |
content:generate | Generate images, captions, and videos |
analytics:read | Dashboard stats, engagement charts, platform breakdowns |
publishing:write | Publish or unpublish content; check status; retry failed publishes |
billing:read | Read credit balances and ledgers |
billing:write | Manage credit wallets |
Endpoints
The full endpoint reference below is generated from the same route map that powers the API, grouped by resource. For request/response schemas and live try-out, use the Swagger UI (the raw spec is at /api/openapi.json).
Some groups are gated: Flows endpoints are in beta and require a Pro or Agency plan, and a few endpoints sit behind feature flags that are off by default — calling them without access returns 403 or 404.
Influencers
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/influencers | character:read | List all influencers |
GET | /api/v1/influencers/:id | character:read | Get an influencer by ID |
POST | /api/v1/influencers | character:write | Create a new influencer |
PUT | /api/v1/influencers/:id | character:write | Update an influencer |
DELETE | /api/v1/influencers/:id | character:write | Delete an influencer (soft-delete; the document is hidden from list and get responses, not removed) |
POST | /api/v1/influencers/:id/references | character:write | Set reference images for an influencer |
POST | /api/v1/influencers/:id/generate-references | character:write | Generate a 4-view reference pack from the character's ingredient library |
POST | /api/v1/influencers/:id/brand-goals | character:write | Replace the influencer's brand goals array |
Content
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/content | content:read | List content items |
POST | /api/v1/content/generate | content:generate | Generate a batch of content |
POST | /api/v1/content | content:write | Create a content item directly (manual upload path; lands in PENDING_REVIEW without AI generation when manualImage / manualCaption is set) |
POST | /api/v1/content/:id/regenerate | content:generate | Regenerate a content item |
POST | /api/v1/content/:id/retry | content:generate | Retry a FAILED content generation, replaying the original intent (recovers customImagePrompt / fineTune tweak / imageOnly / captionOnly / keepSeed / variance from the prior generationRequest). No-op when the item isn't FAILED. |
POST | /api/v1/content/:id/versions/hide | content:write | Hide or unhide a version inside its family. Hidden versions drop out of the grid + Versions browser default view and can't be the active member. |
GET | /api/v1/content/version-groups/:versionGroupId | content:read | List every version in a content item's family (the original plus every regenerate / edit / replace derived from it), newest first, plus which one is currently the active (grid-shown) member. |
POST | /api/v1/content/version-groups/:versionGroupId/active | content:write | Promote one version to the family's active (grid-shown) member. |
POST | /api/v1/content/:id/publish | publishing:write | Publish a content item immediately |
POST | /api/v1/content/:id/video | content:generate | Generate video for a content item. Pass `dialogue` to make the persona speak a specific script (forces Kling provider; requires a cloned voice on the character). |
POST | /api/v1/content/:id/video/reroll-lip-sync | content:generate | Re-roll only the dialogue/lip-sync layer of an existing Kling video. Reuses the cached silent base clip so motion stays bit-identical and only the mouth changes — ~80% cheaper than a full regenerate. |
GET | /api/v1/content/:id | content:read | Get a content item by ID |
PUT | /api/v1/content/:id | content:write | Update a content item |
DELETE | /api/v1/content/:id | content:write | Delete a content item |
POST | /api/v1/content/:id/approve | content:write | Approve content for publishing |
PUT | /api/v1/content/:id/reply-chain | content:write | Set the reply chain (X/Threads follow-up posts) on a content item |
POST | /api/v1/content/:id/reject | content:write | Reject a content item |
GET | /api/v1/content/:id/export | content:read | Download-ready bundle: caption + resolved media URL(s) + publish targets for a content item |
GET | /api/v1/batches/:id | content:read | Get aggregated status for a generation batch |
POST | /api/v1/content/:id/fine-tune-caption | content:write | Fine-tune the caption on a content item without regenerating the image |
POST | /api/v1/content/:id/video-comparison | content:generate | Generate side-by-side video variants for A/B comparison |
POST | /api/v1/content/:id/video-comparison/:winnerId/select | content:write | Select the winning variant from a video comparison |
POST | /api/v1/content/:id/inpaint | content:write | Re-render a masked region of an existing content image. Available only when the influencer's profile content rating allows it; returns FORBIDDEN otherwise. Billable: 1 image inpaint + 1 AI unit. Asynchronous; poll GET /api/v1/content/:id for completion. |
POST | /api/v1/profiles/:profileId/fill-queue | content:generate | Auto-generate content items to fill the profile's queue |
POST | /api/v1/content/broll | content:generate | Generate a B-roll companion asset (image or video) optionally referencing an existing content item |
POST | /api/v1/content/generate-standalone | content:generate | Generate standalone images from a verbatim prompt with no persona conditioning (managed profiles) |
POST | /api/v1/content/carousel | content:write | Compose existing content items into a carousel container |
GET | /api/v1/profiles/:profileId/content/:id/staging | content:read | Preview the staging decision for a content item — returns the platforms it would stage to plus the per-platform shape report (eligible / blocked + tooltip reason). Read-only; does not write targetPlatforms. |
PUT | /api/v1/profiles/:profileId/content/:id/target-platforms | content:write | Set a manual per-content target-platforms override. Subsequent rule changes will NOT clobber this — `targetPlatformsSource: "manual"` is the canonical flag the staging helper checks before falling back to the rule-driven path. |
DELETE | /api/v1/profiles/:profileId/content/:id/target-platforms | content:write | Clear the manual override and revert the content item to the rule-driven path. Next staging call re-evaluates against the character's current publishing defaults. |
POST | /api/v1/profiles/:profileId/content/bulk/target-platforms | content:write | Apply the same manual target-platforms override to many content items in one batch (max 100 ids). All-or-nothing: if any id is missing under the profile, the whole batch is rejected. |
POST | /api/v1/profiles/:profileId/content/bulk/approve | content:write | Bulk-approve up to 100 content items. Each item is staged independently via the same helper that powers single-item approve, so per-item routing rules and overrides are honored. Failures are reported per-item rather than aborting the batch. |
POST | /api/v1/content/bulk-reschedule | content:write | Reschedule multiple content items. mode='distribute' spreads them across each owning profile's posting schedule starting tomorrow; mode='moveBy' shifts all by N minutes; mode='moveTo' sets all to the given timestamp. |
POST | /api/v1/content/bulk-delete | content:write | Bulk-delete up to 100 content items in one call (each {profileId,id} pair authorized independently). Failures isolated per-item. Returns { results: [{id, ok, error?}], successCount, failureCount }. |
POST | /api/v1/content/bulk-upload | content:write | Bulk manual-upload of up to 100 content items in one call. Each item lands in PENDING_REVIEW with the supplied imageUrl/caption — same code path as single-item upload. Per-item ownership checked. Returns { results: [{id, ok, error?}], successCount, failureCount }. |
Content directions
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /api/v1/profiles/:profileId/content-directions/suggest | content:generate | Generate AI-suggested topic directions for a profile |
GET | /api/v1/profiles/:profileId/content-directions | content:read | List content directions for a profile |
POST | /api/v1/profiles/:profileId/content-directions/draft | content:generate | Draft content directions from a freeform prompt (non-persisted preview) |
POST | /api/v1/profiles/:profileId/content-directions | content:write | Create a new content direction for a profile |
PUT | /api/v1/profiles/:profileId/content-directions/:id | content:write | Update a pending content direction |
DELETE | /api/v1/profiles/:profileId/content-directions/:id | content:write | Dismiss a content direction (soft-delete) |
POST | /api/v1/profiles/:profileId/content-directions/:id/accept | content:write | Accept a suggested content direction (converts source from suggested to user-owned) |
Characters (advanced)
| Method | Path | Scope | Description |
|---|---|---|---|
PUT | /api/v1/characters/:id | character:write | Update a character |
DELETE | /api/v1/characters/:id | character:write | Delete a character (soft-delete; the document is hidden from list and get responses, not removed) |
POST | /api/v1/previews/generate | character:write | Generate a preview image from a draft visual identity |
GET | /api/v1/previews/:requestId | character:read | Fetch the result of a preview generation request |
POST | /api/v1/characters/analyze-photos | character:write | Analyze a batch of user photos and return a derived ingredientLibrary draft |
GET | /api/v1/characters/:characterId/voice-profile | character:read | Read the character's voice samples + voiceId |
POST | /api/v1/characters/:characterId/voice-samples | character:write | Attach a voice sample audio URL to a character and clone it via Kling |
DELETE | /api/v1/characters/:characterId/voice-samples | character:write | Remove a voice sample from a character |
GET | /api/v1/characters/:characterId/lora | character:read | Get the current LoRA training status, version, and user-uploaded reference list for a character |
POST | /api/v1/characters/:characterId/lora/references | character:write | Append a user-uploaded reference photo URL to the character's LoRA training set (max 10) |
DELETE | /api/v1/characters/:characterId/lora/references | character:write | Remove a user-uploaded LoRA reference URL |
POST | /api/v1/characters/:characterId/lora/train | character:write | Dispatch a LoRA training run for a character. kind=full (initial, with Gemini auto-set) or kind=fine_tune (cheaper retrain that reuses the existing set). Charges the user upfront — Pro+ only. |
POST | /api/v1/characters/:characterId/lora/rollback | character:write | Roll back the active LoRA to a previously-trained version (no retrain — just flips the URL the inpainter reads) |
POST | /api/v1/characters/:characterId/wardrobe/generate | character:write | Generate reference images for each wardrobe item on a character |
POST | /api/v1/characters/:characterId/suggest-section | character:write | Suggest values for a character section (wardrobe, interests, catchphrases, ...) |
POST | /api/v1/characters/analyze-bio | character:write | Analyze a freeform bio and return structured character traits |
POST | /api/v1/characters/:characterId/fine-tune-references | character:write | Fine-tune existing reference images using a tweak prompt |
POST | /api/v1/characters/:characterId/places/generate | character:write | Generate reference images for each recurring place on a character |
GET | /api/v1/characters/:characterId/publishing-defaults | character:read | Get the character's publishing defaults (per-platform toggles + reserved rules array). Response merges DEFAULT_PER_PLATFORM_TOGGLES with stored values so every PlatformId key is present. |
PATCH | /api/v1/characters/:characterId/publishing-defaults | character:write | Update the character's publishing defaults. MERGES — passing only `perPlatform: { FANVUE: true }` flips Fanvue on without touching other keys. Omit a key to reset it to the built-in default. |
Analytics
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/analytics/stats | analytics:read | Get dashboard statistics |
GET | /api/v1/analytics/engagement | analytics:read | Get engagement chart data |
GET | /api/v1/analytics/top-content | analytics:read | Get top performing content |
GET | /api/v1/analytics/platforms | analytics:read | Get platform breakdown |
Profiles
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/profiles | profile:read | List all profiles for the current user |
GET | /api/v1/profiles/:id | profile:read | Get a profile by ID |
POST | /api/v1/profiles | profile:write | Create a new profile |
PUT | /api/v1/profiles/:id | profile:write | Update a profile |
DELETE | /api/v1/profiles/:id | profile:write | Delete a profile (soft-delete; the document is hidden from list and get responses, not removed) |
GET | /api/v1/profiles/:profileId/content-settings | profile:read | Get content auto-queue settings for a profile |
PUT | /api/v1/profiles/:profileId/content-settings | profile:write | Update content auto-queue settings for a profile |
GET | /api/v1/profiles/:profileId/posting-schedule | profile:read | Get a profile's posting schedule (postsPerDay, preferredTimes, timezone, daysOfWeek, blackoutPeriods) |
PUT | /api/v1/profiles/:profileId/posting-schedule | profile:write | Replace a profile's posting schedule. Body: { schedule: { postsPerDay, preferredTimes, timezone, daysOfWeek, blackoutPeriods } } |
Config (feature flags, pricing, presets)
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/config/features | character:read | Return the runtime feature flag map for this environment |
GET | /api/v1/config/pricing | character:read | Get the published pricing rates (images, video, text, per-action) |
GET | /api/v1/config/aesthetic-grades | character:read | List the 10 built-in aesthetic grade presets |
GET | /api/v1/config/video-providers | character:read | List video provider capability matrix (durations, resolutions, T2V/I2V, audio) |
GET | /api/v1/config/image-providers | character:read | List image provider capability matrix (qualities, sizes, defaults, batch) |
GET | /api/v1/config/feed-style-presets | character:read | List the named feed-style presets (balanced / creator-forward / lifestyle / unpolished) |
Active jobs
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/jobs | content:read | List in-flight generation jobs (content, video, lipsync, LoRA training, profile seed) with expected remaining time and queue position |
Publishing
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/content/:id/publish/status | publishing:write | Get publishing status |
POST | /api/v1/content/:id/publish/retry | publishing:write | Retry failed publish |
POST | /api/v1/content/:id/unpublish | publishing:write | Cancel a SCHEDULED publish before it goes out (resets the item to APPROVED). For removing an item already published to platforms, use POST /api/v1/content/{id}/remove-from-platforms instead. |
POST | /api/v1/content/:id/remove-from-platforms | publishing:write | Remove a PUBLISHED content item from every platform it was posted to (calls each platform's delete API), then reset the item to PENDING_REVIEW so it can be edited and re-scheduled. Returns per-platform results — TikTok and sometimes Fanvue surface `supported:false` because their APIs don't expose deletion (remove manually in the app). |
Social accounts
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/accounts | profile:read | List connected social accounts for a profile |
GET | /api/v1/accounts/audit | profile:read | Audit connected social accounts grouped by profile |
POST | /api/v1/accounts/connect | profile:write | Start connecting a social account; returns a browser authorize URL to approve |
GET | /api/v1/accounts/connect/:state | profile:read | Poll an in-progress social-account connection by its state token |
DELETE | /api/v1/accounts/:id | profile:write | Disconnect a social account |
Managed-account captions
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /api/v1/profiles/:profileId/generate-caption | content:generate | Generate a caption for a MANAGED profile grounded in its voice corpus |
GET | /api/v1/profiles/:profileId/voice-stats | content:read | Get voice corpus statistics for a MANAGED profile |
Media library
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/profiles/:profileId/media-library | content:read | List imported media attached to a profile |
Social import
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /api/v1/social-import/x | content:write | Import the last N posts from a connected X account |
POST | /api/v1/social-import/tiktok | content:write | Import the last N videos from a connected TikTok account |
POST | /api/v1/social-import/instagram | content:write | Import the last N posts from a connected Instagram account (pending Meta scope upgrade) |
GET | /api/v1/social-import/jobs/:jobId | content:read | Poll the status of a social import job |
Collaborations
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/collaborations | character:read | List all collaboration configurations |
GET | /api/v1/collaborations/:id | character:read | Get a collaboration by ID |
POST | /api/v1/collaborations | character:write | Create a new collaboration between two characters |
PUT | /api/v1/collaborations/:id | character:write | Update a collaboration |
DELETE | /api/v1/collaborations/:id | character:write | Delete a collaboration |
POST | /api/v1/collaborations/:id/regenerate-ingredients | character:write | Regenerate the merged ingredient library for a collaboration |
Engagement
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/profiles/:profileId/engagement/settings | content:read | Get engagement engine settings (comment responder / Discovery / DM) |
PUT | /api/v1/profiles/:profileId/engagement/settings | content:write | Update engagement engine settings |
GET | /api/v1/profiles/:profileId/engagement/pending | content:read | List pending engagement actions awaiting approval |
POST | /api/v1/profiles/:profileId/engagement/pending/:actionId/approve | content:write | Approve a pending engagement action |
POST | /api/v1/profiles/:profileId/engagement/pending/bulk-approve | content:write | Bulk-approve pending engagement actions |
POST | /api/v1/profiles/:profileId/engagement/pending/:actionId/reject | content:write | Reject a pending engagement action |
GET | /api/v1/profiles/:profileId/engagement/activity | content:read | Get recent engagement activity for the activity feed |
GET | /api/v1/profiles/:profileId/engagement/pending/count | content:read | Get count of pending engagement actions (sidebar badge) |
Timelines
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /api/v1/timelines | content:write | Create a new timeline for a character |
GET | /api/v1/timelines | content:read | List timelines for a character |
GET | /api/v1/timelines/:id | content:read | Get a timeline (with patterns) by ID |
PUT | /api/v1/timelines/:id | content:write | Update a timeline's metadata or schedule |
DELETE | /api/v1/timelines/:id | content:write | Delete a timeline (and its patterns) |
POST | /api/v1/timelines/:timelineId/patterns | content:write | Add a pattern (daily / weekly / theme) to a timeline |
PUT | /api/v1/timelines/:timelineId/patterns/:id | content:write | Update a pattern on a timeline |
DELETE | /api/v1/timelines/:timelineId/patterns/:id | content:write | Delete a pattern from a timeline |
Learning
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/characters/:characterId/learning/profile | character:read | Get the learning profile (weights + experiments + last analysis) |
GET | /api/v1/characters/:characterId/learning/analyses | analytics:read | List historical analysis runs |
GET | /api/v1/characters/:characterId/learning/experiments | analytics:read | List learning experiments (A/B tests) |
GET | /api/v1/profiles/:profileId/learning/weights | analytics:read | Get current weights for a profile (tag / hour / day) |
GET | /api/v1/profiles/:profileId/learning/weight-history | analytics:read | Get chronological weight-history snapshots for a profile |
Persona library
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/persona-library | character:read | List global persona library templates (optionally filtered by primary niche) |
GET | /api/v1/persona-library/:id | character:read | Get a global persona library template by ID |
POST | /api/v1/persona-library/apply | character:write | Apply a library template to a character |
POST | /api/v1/persona-library/custom | character:write | Save a character's resolved persona layers as a custom library entry |
GET | /api/v1/persona-library/custom/list | character:read | List the caller's custom persona library entries |
Saved references
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/characters/:characterId/saved-references | character:read | List the character's saved reference images |
GET | /api/v1/characters/:characterId/saved-references/:id | character:read | Get a single saved reference image |
POST | /api/v1/characters/:characterId/saved-references | character:write | Create a saved reference image for the character |
PUT | /api/v1/characters/:characterId/saved-references/:id | character:write | Update a saved reference image |
DELETE | /api/v1/characters/:characterId/saved-references/:id | character:write | Delete a saved reference image |
POST | /api/v1/characters/:characterId/saved-references/generate | character:write | Kick off a saved-reference image generation from a prompt |
POST | /api/v1/characters/:characterId/saved-references/accept-generated | character:write | Accept a generated saved-reference preview and persist it to the library |
POST | /api/v1/characters/:characterId/saved-references/discard-generated | character:write | Discard a generated saved-reference preview (best-effort storage cleanup) |
graphics
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/graphic-templates | content:read | List designed-graphic templates (system library + custom) and the renderer font registry |
POST | /api/v1/graphic-templates/compile | content:generate | Compile a custom graphic template from a directive (Pro+; ships in a later phase) |
GET | /api/v1/graphic-templates/:templateId | content:read | Get one designed-graphic template, optionally with its HTML/CSS source |
GET | /api/v1/graphic-fonts | content:read | List the renderer's self-hosted font registry (ids, categories, weights) |
POST | /api/v1/graphics/preview | content:read | Preview a designed graphic as bound HTML (free — no render, no charge) |
POST | /api/v1/graphics | content:generate | Create a designed-graphic post from a template (renders each requested aspect, lands in PENDING_REVIEW) |
POST | /api/v1/graphics/:id/variant | content:generate | Render an additional aspect-ratio variant for an existing graphic post |
GET | /api/v1/brand-kits | profile:read | List the caller's brand kits |
POST | /api/v1/brand-kits | profile:write | Create or update a brand kit (colors, fonts from the renderer registry, logo, handle) |
DELETE | /api/v1/brand-kits/:kitId | profile:write | Delete a brand kit |
Flows (beta, Pro and up)
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/prompt-flows | character:read | List the caller's prompt flows (node graphs) |
GET | /api/v1/prompt-flows/catalog | character:read | Get the node catalog (available node types, typed ports, and config fields) |
GET | /api/v1/prompt-flows/:id | character:read | Get a prompt flow by id (full nodes + edges) |
POST | /api/v1/prompt-flows | character:write | Create a prompt flow (seeded from the built-in pipeline when nodes are omitted) |
DELETE | /api/v1/prompt-flows/:id | character:write | Delete a prompt flow |
POST | /api/v1/prompt-flows/:flowId/nodes | character:write | Add or replace a node in a flow |
PATCH | /api/v1/prompt-flows/:flowId/nodes/:nodeId | character:write | Update a single node's config |
POST | /api/v1/prompt-flows/:flowId/edges | character:write | Connect two nodes (typed-port edge) |
DELETE | /api/v1/prompt-flows/:flowId/edges/:edgeId | character:write | Remove an edge from a flow |
POST | /api/v1/prompt-flows/:flowId/assign | character:write | Assign or unassign a flow to a character for one pipeline kind (non-destructive; kind defaults to composite) |
POST | /api/v1/prompt-flows/:id/publish | character:write | Publish the flow's current draft as an immutable, executable revision |
GET | /api/v1/prompt-flows/:id/revisions | character:read | List a flow's published revisions (newest first, max 50) |
POST | /api/v1/prompt-flows/:id/rollback | character:write | Restore a published revision's content onto the flow's draft (re-publish to make it live) |
PUT | /api/v1/prompt-flows/:id/acl | character:write | Replace the flow's sharing ACL (owner only) |
POST | /api/v1/prompt-flows/:id/runs | content:generate | Run a flow (mode: dry = free, generators stubbed; test = billable, executes real generators) against one of your characters |
GET | /api/v1/prompt-flows/:id/runs | character:read | List a flow's run history (summaries only, newest first) |
GET | /api/v1/prompt-flows/:id/runs/:runId | character:read | Get one flow run (status + full per-node trace) |
Credits (flag-gated)
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /api/v1/nsfw-credits | billing:read | Get the current NSFW credit balance, lifetime totals, and linked Solana sender wallet. Lazy-refreshes from Solana RPC before returning, so a recent deposit shows up. |
GET | /api/v1/nsfw-credits/deposit-info | billing:read | Get deposit instructions: platform Solana address, USDC mint, network, and the user's currently linked sender wallet. |
POST | /api/v1/nsfw-credits/wallet | billing:write | Link a Solana wallet address as the user's sending wallet. Returns CONFLICT if already linked to another account. |
DELETE | /api/v1/nsfw-credits/wallet | billing:write | Unlink the user's sending wallet. Ledger history is preserved. |
GET | /api/v1/nsfw-credits/ledger | billing:read | Paginated NSFW credit ledger entries (deposits, spends, refunds), newest first. |
Asset uploads
| Method | Path | Scope | Description |
|---|---|---|---|
POST | /api/v1/assets | content:write | Upload an asset by inline base64 bytes. Use for small inline payloads (a few hundred KB). For larger files, prefer /api/v1/assets/from-url so bytes don't round-trip through the JSON body. Returns { assetId, publicUrl, contentType, sizeBytes }. |
POST | /api/v1/assets/from-url | content:write | Ingest a public http(s) URL into our storage (server-side fetch with 10 MB cap). Useful for CDN-hosted images, generated outputs already on a different host, or screenshots. Returns { assetId, publicUrl, contentType, sizeBytes }. |
Error Codes
| Code | Meaning |
|---|---|
400 | Invalid request body or query parameters |
401 | Missing or invalid API key |
403 | Key lacks the required scope, or billing setup is required (error_code: billing_required) |
404 | Resource not found |
409 | Conflict with existing state |
429 | Rate limit exceeded |
500 | Internal server error |
Code Examples
List Influencers
curl https://autopersonas.com/api/v1/influencers \
-H "Authorization: Bearer ap_live_YOUR_KEY"Generate Content
Requires content:generate. directionContext steers the batch; count is 1–5 items. The response returns a batchId — poll GET /api/v1/batches/:id until generation finishes.
curl -X POST https://autopersonas.com/api/v1/content/generate \
-H "Authorization: Bearer ap_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"profileId": "prof_abc123",
"count": 3,
"directionContext": { "topic": "morning gym routine" }
}'Publish a Post
Requires publishing:write. Publishes an approved content item to the platforms connected to its profile.
curl -X POST https://autopersonas.com/api/v1/content/CONTENT_ID/publish \
-H "Authorization: Bearer ap_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{}'Using an AI Agent?
If you are connecting an AI agent (Claude, ChatGPT, Cursor, or any MCP-compatible client) rather than writing HTTP calls yourself, use the hosted MCP server instead — one URL, no SDK, the same API keys and scopes.
Interactive Docs
Prefer to explore the API visually? Open the Swagger UI to browse every endpoint, try requests live, inspect response schemas, and copy ready-made code snippets.