Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Fish Audio

Scalekit connector
Open markdown

The Fish Audio connector lets your AI agent act in each user's Fish Audio account. Each user connects their own Fish Audio access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 34 tools.

Tools
34
What they doRead · write · destructive
19 · 11 · 419 read11 write4 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Fish Audio connection

    In AgentKit > Connections, create a Fish Audio connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'fishaudio'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Fish Audio:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'fishaudio_get_api_credit',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Fish Audio credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • fishaudio_get_agentGet one voice agent's profile.Read-only

    Get Agent

    Get one voice agent's profile. Returns agent_id, workspace_id, name, description, status, publication_state, public_enabled, allowed_origins, overrides_allowed and timestamps. Use this for agent-level settings. Use fishaudio_get_agent_config for the draft voice, prompt and conversation settings.

    Inputs

    agent_idstringrequired
    ID of the agent, from fishaudio_list_agents or fishaudio_create_agent (the agent_id field). Example: 4f2a8c6e1b3d5f7a9c0e2d4b6a8f1c3e
  • fishaudio_get_agent_configGet a voice agent's current draft configuration, the state the next publish will freeze.Read-only

    Get Agent Config

    Get a voice agent's current draft configuration, the state the next publish will freeze. Returns config_hash and the prompt, voice, asr, conversation, tools, webhooks, knowledge_base, analysis, guardrails, llm and variables sections; secrets read back as has_secret. Use this to read voice and prompt settings. Live sessions run the published version: use fishaudio_get_agent_version for that.

    Inputs

    agent_idstringrequired
    ID of the agent, from fishaudio_list_agents or fishaudio_create_agent (the agent_id field). Example: 4f2a8c6e1b3d5f7a9c0e2d4b6a8f1c3e
  • fishaudio_get_agent_sessionGet one voice agent session with its full conversation timeline.Read-only

    Get Agent Session

    Get one voice agent session with its full conversation timeline. Returns status, timing, caller details and the timeline of transcript turns interleaved with tool calls, in order, plus post-call analysis when available. Use this to read what was said on a call. Use fishaudio_get_agent_session_recording for the audio.

    Inputs

    session_idstringrequired
    Agent session ID, from fishaudio_list_agent_sessions or the session_id returned by fishaudio_create_phone_call. Example: 9b1d3f5a7c9e4b2d8f6a1c3e5b7d9f0a
  • fishaudio_get_agent_session_recordingGet time-limited download links for a session's audio recording, one track per speaker.Read-only

    Get Agent Session Recording

    Get time-limited download links for a session's audio recording, one track per speaker. Returns status (processing, complete or failed) and tracks, each with role (agent, user or human), url, expires_at and duration_ms. Use this to fetch call audio; the links expire, so download soon. Recording must be on in the agent's conversation settings. Use fishaudio_get_agent_session for the transcript.

    Inputs

    session_idstringrequired
    Agent session ID, from fishaudio_list_agent_sessions or the session_id returned by fishaudio_create_phone_call. Example: 9b1d3f5a7c9e4b2d8f6a1c3e5b7d9f0a
  • fishaudio_get_agent_toolGet one voice agent tool's full definition.Read-only

    Get Agent Tool

    Get one voice agent tool's full definition. Returns name, description, tool_type, arguments, method, url, content_type, body_template, headers (credentials shown only as has_secret), timeout and execution settings. Use this before editing a tool with fishaudio_update_agent_tool.

    Inputs

    tool_idstringrequired
    Agent tool ID, from fishaudio_list_agent_tools. Example: tool_8f2c4e6a1b3d
  • fishaudio_get_agent_versionGet one published version of a voice agent with its frozen configuration.Read-only

    Get Agent Version

    Get one published version of a voice agent with its frozen configuration. Returns version_number, version_title, config_hash, published_at and config (prompt, voice, asr, conversation, tools, knowledge_base, llm and other sections), with secrets redacted. Use this to see what a live or past version runs. Use fishaudio_get_agent_config for the unpublished draft.

    Inputs

    agent_idstringrequired
    ID of the agent, from fishaudio_list_agents or fishaudio_create_agent (the agent_id field). Example: 4f2a8c6e1b3d5f7a9c0e2d4b6a8f1c3e
    version_numberintegerrequired
    Version number to read, from fishaudio_list_agent_versions. Example: 3
  • fishaudio_get_api_creditGet the API credit balance of the account that owns the API key.Read-only

    Get API Credit

    Get the API credit balance of the account that owns the API key. Returns credit (remaining balance, as a decimal string), cumulative_top_up, has_free_credit and timestamps. Use this before large jobs to check the balance. Use fishaudio_get_package for the subscription plan and its quota.

    Inputs

    check_free_creditboolean
    Set to true to also report whether the account still has free credit (has_free_credit). Defaults to false.
    team_idstring
    Team ID to read the credit of, when the key belongs to several teams. Leave empty for the key's own account.
  • fishaudio_get_knowledge_sourceGet one knowledge source with its full text content.Read-only

    Get Knowledge Source

    Get one knowledge source with its full text content. Returns the source's ID, name, description, full text content and current revision number. Use this to read what an agent knows. Use fishaudio_list_knowledge_sources to find the ID.

    Inputs

    source_idstringrequired
    Knowledge source ID, from fishaudio_list_knowledge_sources. Example: 3e5a7c9b1d2f4e6a8c0b2d4f6a8c1e3b