AutoPersonas

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/v1

Every 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, and X-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.

ScopeDescription
character:readList and view influencers, previews, and character data
character:writeCreate, update, delete influencers; manage references, wardrobe, and voice
profile:readList and view profiles and their settings
profile:writeCreate, update, delete profiles; edit posting schedules
content:readList content items, batches, and import/job status
content:writeUpdate, delete, approve, reject, upload, and reschedule content
content:generateGenerate images, captions, and videos
analytics:readDashboard stats, engagement charts, platform breakdowns
publishing:writePublish or unpublish content; check status; retry failed publishes
billing:readRead credit balances and ledgers
billing:writeManage 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

MethodPathScopeDescription
GET/api/v1/influencerscharacter:readList all influencers
GET/api/v1/influencers/:idcharacter:readGet an influencer by ID
POST/api/v1/influencerscharacter:writeCreate a new influencer
PUT/api/v1/influencers/:idcharacter:writeUpdate an influencer
DELETE/api/v1/influencers/:idcharacter:writeDelete an influencer (soft-delete; the document is hidden from list and get responses, not removed)
POST/api/v1/influencers/:id/referencescharacter:writeSet reference images for an influencer
POST/api/v1/influencers/:id/generate-referencescharacter:writeGenerate a 4-view reference pack from the character's ingredient library
POST/api/v1/influencers/:id/brand-goalscharacter:writeReplace the influencer's brand goals array

Content

MethodPathScopeDescription
GET/api/v1/contentcontent:readList content items
POST/api/v1/content/generatecontent:generateGenerate a batch of content
POST/api/v1/contentcontent:writeCreate a content item directly (manual upload path; lands in PENDING_REVIEW without AI generation when manualImage / manualCaption is set)
POST/api/v1/content/:id/regeneratecontent:generateRegenerate a content item
POST/api/v1/content/:id/retrycontent:generateRetry 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/hidecontent:writeHide 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/:versionGroupIdcontent:readList 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/activecontent:writePromote one version to the family's active (grid-shown) member.
POST/api/v1/content/:id/publishpublishing:writePublish a content item immediately
POST/api/v1/content/:id/videocontent:generateGenerate 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-synccontent:generateRe-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/:idcontent:readGet a content item by ID
PUT/api/v1/content/:idcontent:writeUpdate a content item
DELETE/api/v1/content/:idcontent:writeDelete a content item
POST/api/v1/content/:id/approvecontent:writeApprove content for publishing
PUT/api/v1/content/:id/reply-chaincontent:writeSet the reply chain (X/Threads follow-up posts) on a content item
POST/api/v1/content/:id/rejectcontent:writeReject a content item
GET/api/v1/content/:id/exportcontent:readDownload-ready bundle: caption + resolved media URL(s) + publish targets for a content item
GET/api/v1/batches/:idcontent:readGet aggregated status for a generation batch
POST/api/v1/content/:id/fine-tune-captioncontent:writeFine-tune the caption on a content item without regenerating the image
POST/api/v1/content/:id/video-comparisoncontent:generateGenerate side-by-side video variants for A/B comparison
POST/api/v1/content/:id/video-comparison/:winnerId/selectcontent:writeSelect the winning variant from a video comparison
POST/api/v1/content/:id/inpaintcontent:writeRe-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-queuecontent:generateAuto-generate content items to fill the profile's queue
POST/api/v1/content/brollcontent:generateGenerate a B-roll companion asset (image or video) optionally referencing an existing content item
POST/api/v1/content/generate-standalonecontent:generateGenerate standalone images from a verbatim prompt with no persona conditioning (managed profiles)
POST/api/v1/content/carouselcontent:writeCompose existing content items into a carousel container
GET/api/v1/profiles/:profileId/content/:id/stagingcontent:readPreview 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-platformscontent:writeSet 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-platformscontent:writeClear 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-platformscontent:writeApply 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/approvecontent:writeBulk-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-reschedulecontent:writeReschedule 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-deletecontent:writeBulk-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-uploadcontent:writeBulk 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

MethodPathScopeDescription
POST/api/v1/profiles/:profileId/content-directions/suggestcontent:generateGenerate AI-suggested topic directions for a profile
GET/api/v1/profiles/:profileId/content-directionscontent:readList content directions for a profile
POST/api/v1/profiles/:profileId/content-directions/draftcontent:generateDraft content directions from a freeform prompt (non-persisted preview)
POST/api/v1/profiles/:profileId/content-directionscontent:writeCreate a new content direction for a profile
PUT/api/v1/profiles/:profileId/content-directions/:idcontent:writeUpdate a pending content direction
DELETE/api/v1/profiles/:profileId/content-directions/:idcontent:writeDismiss a content direction (soft-delete)
POST/api/v1/profiles/:profileId/content-directions/:id/acceptcontent:writeAccept a suggested content direction (converts source from suggested to user-owned)

Characters (advanced)

MethodPathScopeDescription
PUT/api/v1/characters/:idcharacter:writeUpdate a character
DELETE/api/v1/characters/:idcharacter:writeDelete a character (soft-delete; the document is hidden from list and get responses, not removed)
POST/api/v1/previews/generatecharacter:writeGenerate a preview image from a draft visual identity
GET/api/v1/previews/:requestIdcharacter:readFetch the result of a preview generation request
POST/api/v1/characters/analyze-photoscharacter:writeAnalyze a batch of user photos and return a derived ingredientLibrary draft
GET/api/v1/characters/:characterId/voice-profilecharacter:readRead the character's voice samples + voiceId
POST/api/v1/characters/:characterId/voice-samplescharacter:writeAttach a voice sample audio URL to a character and clone it via Kling
DELETE/api/v1/characters/:characterId/voice-samplescharacter:writeRemove a voice sample from a character
GET/api/v1/characters/:characterId/loracharacter:readGet the current LoRA training status, version, and user-uploaded reference list for a character
POST/api/v1/characters/:characterId/lora/referencescharacter:writeAppend a user-uploaded reference photo URL to the character's LoRA training set (max 10)
DELETE/api/v1/characters/:characterId/lora/referencescharacter:writeRemove a user-uploaded LoRA reference URL
POST/api/v1/characters/:characterId/lora/traincharacter:writeDispatch 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/rollbackcharacter:writeRoll back the active LoRA to a previously-trained version (no retrain — just flips the URL the inpainter reads)
POST/api/v1/characters/:characterId/wardrobe/generatecharacter:writeGenerate reference images for each wardrobe item on a character
POST/api/v1/characters/:characterId/suggest-sectioncharacter:writeSuggest values for a character section (wardrobe, interests, catchphrases, ...)
POST/api/v1/characters/analyze-biocharacter:writeAnalyze a freeform bio and return structured character traits
POST/api/v1/characters/:characterId/fine-tune-referencescharacter:writeFine-tune existing reference images using a tweak prompt
POST/api/v1/characters/:characterId/places/generatecharacter:writeGenerate reference images for each recurring place on a character
GET/api/v1/characters/:characterId/publishing-defaultscharacter:readGet 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-defaultscharacter:writeUpdate 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

MethodPathScopeDescription
GET/api/v1/analytics/statsanalytics:readGet dashboard statistics
GET/api/v1/analytics/engagementanalytics:readGet engagement chart data
GET/api/v1/analytics/top-contentanalytics:readGet top performing content
GET/api/v1/analytics/platformsanalytics:readGet platform breakdown

Profiles

MethodPathScopeDescription
GET/api/v1/profilesprofile:readList all profiles for the current user
GET/api/v1/profiles/:idprofile:readGet a profile by ID
POST/api/v1/profilesprofile:writeCreate a new profile
PUT/api/v1/profiles/:idprofile:writeUpdate a profile
DELETE/api/v1/profiles/:idprofile:writeDelete a profile (soft-delete; the document is hidden from list and get responses, not removed)
GET/api/v1/profiles/:profileId/content-settingsprofile:readGet content auto-queue settings for a profile
PUT/api/v1/profiles/:profileId/content-settingsprofile:writeUpdate content auto-queue settings for a profile
GET/api/v1/profiles/:profileId/posting-scheduleprofile:readGet a profile's posting schedule (postsPerDay, preferredTimes, timezone, daysOfWeek, blackoutPeriods)
PUT/api/v1/profiles/:profileId/posting-scheduleprofile:writeReplace a profile's posting schedule. Body: { schedule: { postsPerDay, preferredTimes, timezone, daysOfWeek, blackoutPeriods } }

Config (feature flags, pricing, presets)

MethodPathScopeDescription
GET/api/v1/config/featurescharacter:readReturn the runtime feature flag map for this environment
GET/api/v1/config/pricingcharacter:readGet the published pricing rates (images, video, text, per-action)
GET/api/v1/config/aesthetic-gradescharacter:readList the 10 built-in aesthetic grade presets
GET/api/v1/config/video-providerscharacter:readList video provider capability matrix (durations, resolutions, T2V/I2V, audio)
GET/api/v1/config/image-providerscharacter:readList image provider capability matrix (qualities, sizes, defaults, batch)
GET/api/v1/config/feed-style-presetscharacter:readList the named feed-style presets (balanced / creator-forward / lifestyle / unpolished)

Active jobs

MethodPathScopeDescription
GET/api/v1/jobscontent:readList in-flight generation jobs (content, video, lipsync, LoRA training, profile seed) with expected remaining time and queue position

Publishing

MethodPathScopeDescription
GET/api/v1/content/:id/publish/statuspublishing:writeGet publishing status
POST/api/v1/content/:id/publish/retrypublishing:writeRetry failed publish
POST/api/v1/content/:id/unpublishpublishing:writeCancel 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-platformspublishing:writeRemove 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

MethodPathScopeDescription
GET/api/v1/accountsprofile:readList connected social accounts for a profile
GET/api/v1/accounts/auditprofile:readAudit connected social accounts grouped by profile
POST/api/v1/accounts/connectprofile:writeStart connecting a social account; returns a browser authorize URL to approve
GET/api/v1/accounts/connect/:stateprofile:readPoll an in-progress social-account connection by its state token
DELETE/api/v1/accounts/:idprofile:writeDisconnect a social account

Managed-account captions

MethodPathScopeDescription
POST/api/v1/profiles/:profileId/generate-captioncontent:generateGenerate a caption for a MANAGED profile grounded in its voice corpus
GET/api/v1/profiles/:profileId/voice-statscontent:readGet voice corpus statistics for a MANAGED profile

Media library

MethodPathScopeDescription
GET/api/v1/profiles/:profileId/media-librarycontent:readList imported media attached to a profile

Social import

MethodPathScopeDescription
POST/api/v1/social-import/xcontent:writeImport the last N posts from a connected X account
POST/api/v1/social-import/tiktokcontent:writeImport the last N videos from a connected TikTok account
POST/api/v1/social-import/instagramcontent:writeImport the last N posts from a connected Instagram account (pending Meta scope upgrade)
GET/api/v1/social-import/jobs/:jobIdcontent:readPoll the status of a social import job

Collaborations

MethodPathScopeDescription
GET/api/v1/collaborationscharacter:readList all collaboration configurations
GET/api/v1/collaborations/:idcharacter:readGet a collaboration by ID
POST/api/v1/collaborationscharacter:writeCreate a new collaboration between two characters
PUT/api/v1/collaborations/:idcharacter:writeUpdate a collaboration
DELETE/api/v1/collaborations/:idcharacter:writeDelete a collaboration
POST/api/v1/collaborations/:id/regenerate-ingredientscharacter:writeRegenerate the merged ingredient library for a collaboration

Engagement

MethodPathScopeDescription
GET/api/v1/profiles/:profileId/engagement/settingscontent:readGet engagement engine settings (comment responder / Discovery / DM)
PUT/api/v1/profiles/:profileId/engagement/settingscontent:writeUpdate engagement engine settings
GET/api/v1/profiles/:profileId/engagement/pendingcontent:readList pending engagement actions awaiting approval
POST/api/v1/profiles/:profileId/engagement/pending/:actionId/approvecontent:writeApprove a pending engagement action
POST/api/v1/profiles/:profileId/engagement/pending/bulk-approvecontent:writeBulk-approve pending engagement actions
POST/api/v1/profiles/:profileId/engagement/pending/:actionId/rejectcontent:writeReject a pending engagement action
GET/api/v1/profiles/:profileId/engagement/activitycontent:readGet recent engagement activity for the activity feed
GET/api/v1/profiles/:profileId/engagement/pending/countcontent:readGet count of pending engagement actions (sidebar badge)

Timelines

MethodPathScopeDescription
POST/api/v1/timelinescontent:writeCreate a new timeline for a character
GET/api/v1/timelinescontent:readList timelines for a character
GET/api/v1/timelines/:idcontent:readGet a timeline (with patterns) by ID
PUT/api/v1/timelines/:idcontent:writeUpdate a timeline's metadata or schedule
DELETE/api/v1/timelines/:idcontent:writeDelete a timeline (and its patterns)
POST/api/v1/timelines/:timelineId/patternscontent:writeAdd a pattern (daily / weekly / theme) to a timeline
PUT/api/v1/timelines/:timelineId/patterns/:idcontent:writeUpdate a pattern on a timeline
DELETE/api/v1/timelines/:timelineId/patterns/:idcontent:writeDelete a pattern from a timeline

Learning

MethodPathScopeDescription
GET/api/v1/characters/:characterId/learning/profilecharacter:readGet the learning profile (weights + experiments + last analysis)
GET/api/v1/characters/:characterId/learning/analysesanalytics:readList historical analysis runs
GET/api/v1/characters/:characterId/learning/experimentsanalytics:readList learning experiments (A/B tests)
GET/api/v1/profiles/:profileId/learning/weightsanalytics:readGet current weights for a profile (tag / hour / day)
GET/api/v1/profiles/:profileId/learning/weight-historyanalytics:readGet chronological weight-history snapshots for a profile

Persona library

MethodPathScopeDescription
GET/api/v1/persona-librarycharacter:readList global persona library templates (optionally filtered by primary niche)
GET/api/v1/persona-library/:idcharacter:readGet a global persona library template by ID
POST/api/v1/persona-library/applycharacter:writeApply a library template to a character
POST/api/v1/persona-library/customcharacter:writeSave a character's resolved persona layers as a custom library entry
GET/api/v1/persona-library/custom/listcharacter:readList the caller's custom persona library entries

Saved references

MethodPathScopeDescription
GET/api/v1/characters/:characterId/saved-referencescharacter:readList the character's saved reference images
GET/api/v1/characters/:characterId/saved-references/:idcharacter:readGet a single saved reference image
POST/api/v1/characters/:characterId/saved-referencescharacter:writeCreate a saved reference image for the character
PUT/api/v1/characters/:characterId/saved-references/:idcharacter:writeUpdate a saved reference image
DELETE/api/v1/characters/:characterId/saved-references/:idcharacter:writeDelete a saved reference image
POST/api/v1/characters/:characterId/saved-references/generatecharacter:writeKick off a saved-reference image generation from a prompt
POST/api/v1/characters/:characterId/saved-references/accept-generatedcharacter:writeAccept a generated saved-reference preview and persist it to the library
POST/api/v1/characters/:characterId/saved-references/discard-generatedcharacter:writeDiscard a generated saved-reference preview (best-effort storage cleanup)

graphics

MethodPathScopeDescription
GET/api/v1/graphic-templatescontent:readList designed-graphic templates (system library + custom) and the renderer font registry
POST/api/v1/graphic-templates/compilecontent:generateCompile a custom graphic template from a directive (Pro+; ships in a later phase)
GET/api/v1/graphic-templates/:templateIdcontent:readGet one designed-graphic template, optionally with its HTML/CSS source
GET/api/v1/graphic-fontscontent:readList the renderer's self-hosted font registry (ids, categories, weights)
POST/api/v1/graphics/previewcontent:readPreview a designed graphic as bound HTML (free — no render, no charge)
POST/api/v1/graphicscontent:generateCreate a designed-graphic post from a template (renders each requested aspect, lands in PENDING_REVIEW)
POST/api/v1/graphics/:id/variantcontent:generateRender an additional aspect-ratio variant for an existing graphic post
GET/api/v1/brand-kitsprofile:readList the caller's brand kits
POST/api/v1/brand-kitsprofile:writeCreate or update a brand kit (colors, fonts from the renderer registry, logo, handle)
DELETE/api/v1/brand-kits/:kitIdprofile:writeDelete a brand kit

Flows (beta, Pro and up)

MethodPathScopeDescription
GET/api/v1/prompt-flowscharacter:readList the caller's prompt flows (node graphs)
GET/api/v1/prompt-flows/catalogcharacter:readGet the node catalog (available node types, typed ports, and config fields)
GET/api/v1/prompt-flows/:idcharacter:readGet a prompt flow by id (full nodes + edges)
POST/api/v1/prompt-flowscharacter:writeCreate a prompt flow (seeded from the built-in pipeline when nodes are omitted)
DELETE/api/v1/prompt-flows/:idcharacter:writeDelete a prompt flow
POST/api/v1/prompt-flows/:flowId/nodescharacter:writeAdd or replace a node in a flow
PATCH/api/v1/prompt-flows/:flowId/nodes/:nodeIdcharacter:writeUpdate a single node's config
POST/api/v1/prompt-flows/:flowId/edgescharacter:writeConnect two nodes (typed-port edge)
DELETE/api/v1/prompt-flows/:flowId/edges/:edgeIdcharacter:writeRemove an edge from a flow
POST/api/v1/prompt-flows/:flowId/assigncharacter:writeAssign or unassign a flow to a character for one pipeline kind (non-destructive; kind defaults to composite)
POST/api/v1/prompt-flows/:id/publishcharacter:writePublish the flow's current draft as an immutable, executable revision
GET/api/v1/prompt-flows/:id/revisionscharacter:readList a flow's published revisions (newest first, max 50)
POST/api/v1/prompt-flows/:id/rollbackcharacter:writeRestore a published revision's content onto the flow's draft (re-publish to make it live)
PUT/api/v1/prompt-flows/:id/aclcharacter:writeReplace the flow's sharing ACL (owner only)
POST/api/v1/prompt-flows/:id/runscontent:generateRun a flow (mode: dry = free, generators stubbed; test = billable, executes real generators) against one of your characters
GET/api/v1/prompt-flows/:id/runscharacter:readList a flow's run history (summaries only, newest first)
GET/api/v1/prompt-flows/:id/runs/:runIdcharacter:readGet one flow run (status + full per-node trace)

Credits (flag-gated)

MethodPathScopeDescription
GET/api/v1/nsfw-creditsbilling:readGet 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-infobilling:readGet deposit instructions: platform Solana address, USDC mint, network, and the user's currently linked sender wallet.
POST/api/v1/nsfw-credits/walletbilling:writeLink a Solana wallet address as the user's sending wallet. Returns CONFLICT if already linked to another account.
DELETE/api/v1/nsfw-credits/walletbilling:writeUnlink the user's sending wallet. Ledger history is preserved.
GET/api/v1/nsfw-credits/ledgerbilling:readPaginated NSFW credit ledger entries (deposits, spends, refunds), newest first.

Asset uploads

MethodPathScopeDescription
POST/api/v1/assetscontent:writeUpload 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-urlcontent:writeIngest 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

CodeMeaning
400Invalid request body or query parameters
401Missing or invalid API key
403Key lacks the required scope, or billing setup is required (error_code: billing_required)
404Resource not found
409Conflict with existing state
429Rate limit exceeded
500Internal 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.