Skip to main content
Create one client and reuse it. It holds no connection and no state besides its key.

Constructor

string
required
Your secret API key, lyra_sk_…. See Where to find your identifiers.
string
default:"https://app.concatflow.com"
The Concatflow API origin. A trailing / is removed.
The constructor throws an Error:
  • if apiKey does not start with lyra_sk_;
  • if it runs in a browser (a global window exists). Your key would be sent to every visitor.

Resources

Every method returns a promise. A non-2xx answer rejects with a ConcatflowError.

Runtime

  • Uses the global fetch of Node 18 and later.
  • ESM only: import, not require.
  • Your key is sent as Authorization: Bearer lyra_sk_…. It never appears in error messages.

Exports

encodePartition({ customer_id: "4712", region: "eu" }) returns "customer_id=4712,region=eu", the form the HTTP API expects.