Skip to main content

FluidTalk Characters — Python SDK

Official Python SDK for the FluidTalk Characters API — drive an AI persona across DMs, comments, triggers, and follow-ups from your own bot or connector.

Install

pip install fluidtalk

Quickstart

from fluidtalk import FluidTalk

ft = FluidTalk(token="ftc_live_...")          # base_url defaults to production

# A lead DM'd the character — get the reply and send the bubbles yourself.
reply = ft.chat(platform="instagram", handle="mark", message="hey ava")
for bubble in reply.bubbles:
    send_dm("mark", bubble.text)              # your platform I/O
print("session:", reply.session_id)

Your per-character connector token (ftc_live_…) is sent as X-Connector-Token; get it from the character's platform settings in the dashboard. The token is the character — you name the platform in each call.

API

Method Endpoint
ft.chat(platform, handle, message="", image_url=None, session_id=None, own_username=None) POST /chat
ft.event(platform, handle, external_event_id, event_type="purchase", amount=None, currency=None) POST /events
ft.trigger(platform, handle, event_id, external_event_id, context=None, own_username=None) POST /triggers
ft.followups.list(platform, own_username=None, limit=100) GET /followups
ft.followups.ack(followup_id) POST /followups/{id}/ack
ft.comment(platform, post_ref, caption=None, image_urls=None, author_handle=None) POST /comments
ft.comment_reply(platform, post_ref, replier_handle, reply_text="", parent_comment_ref=None) POST /comments/reply

Responses are returned as attribute-access objects unwrapped from the {data, request_id} envelope (reply.bubbles[0].text, res.decision); a missing field reads as None. Use .to_dict() for the raw dict.

Errors

Every non-2xx response raises a typed exception (all subclass FluidTalkError / ApiError):

from fluidtalk import FluidTalk, PaymentRequiredError, RateLimitError, ApiError

ft = FluidTalk(token="ftc_live_...")
try:
    reply = ft.chat(platform="instagram", handle="mark", message="hi")
except PaymentRequiredError:
    top_up_wallet()        # 402 — the wallet can't cover the turn
except RateLimitError:
    backoff_and_retry()    # 429
except ApiError as e:
    print(e.status, e.code, e.request_id, e.message)

AuthError (401), PaymentRequiredError (402), PermissionError (403), NotFoundError (404), ConflictError (409), ValidationError (422), RateLimitError (429), and ApiError (anything else).

Configuration

FluidTalk(
    token="ftc_live_...",
    base_url="https://api-talk.fluidvip.com",   # green: https://api-green-talk.fluidvip.com
    timeout=60.0,
)

Development

pip install -e ".[dev]"
pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fluidtalk-2.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluidtalk-2.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file fluidtalk-2.0.0.tar.gz.

File metadata

  • Download URL: fluidtalk-2.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for fluidtalk-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0b60de656892a6c20af2509bb0dfb8519a363b693fa0645e4719278aad71120a
MD5 7233948e2e11113ce5e5d33389dded14
BLAKE2b-256 862f2f84a31f20e1fec61573c7d984f1429367982e47ffeb95c0ab295dce3326

See more details on using hashes here.

File details

Details for the file fluidtalk-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: fluidtalk-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for fluidtalk-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c473bddfdae083fc81476a9321a705f013ff361c5e073e4b6450a97a12d9fb7c
MD5 ddcfb1ba212ed3823de4335f666b0b4f
BLAKE2b-256 d964b08932fdb00fb948e309a70d504c4cae6adbb075aa01b7d2fce305e3f99d

See more details on using hashes here.

Release history Release notifications | RSS feed

2.1.0

2 files

This release

2.0.0 This release

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page