# chainz documentation
> chainz: chain AI models, tools and your team's files into flows that run on a schedule or from a webhook. Visual builder, no code. In development, waitlist open.
# Introduction
> chainz chains AI models, tools and your team's files into flows that run on demand, on a schedule or from your own code.
chainz is the team workspace of the waiyers apps for AI automations. You build a **flow** by placing components on a canvas and linking them: a model writes, a search finds sources, a file is read, a post is published. Then you run it yourself, put it on the team agenda, or call it from your own code.
> [!NOTE]
> chainz is in development. These pages describe what the app does today; anything not ready yet is marked as such.
## Start here
- [Quickstart](/docs/get-started/quickstart/) Sign in, open a starter flow and run it in five minutes.
- [Key concepts](/docs/get-started/concepts/) Teams, projects, workspaces, flows, components, runs and credits.
- [The canvas](/docs/flows/canvas/) Place components, link them and test each step.
- [Scheduled runs](/docs/automate/schedules/) Let a flow run every hour, every weekday or on any cron.
## What you can build
- **Content**: a caption, a generated image and an Instagram post from one product brief.
- **Research**: search the web or the news, read the pages, summarise them with a model.
- **Reports**: read a file from the team's files and turn it into figures, tables and highlights.
- **Translation**: translate texts or documents into the languages you need.
## For developers
Every flow can be run over HTTP with the same sign-in as the app. See the [API overview](/docs/api/overview/).
- [Run a flow](/docs/api/run-a-flow/) `POST /api/run/{flow}` with inputs, tweaks and streaming.
- [Authentication](/docs/api/authentication/) Get a bearer token for your calls.
## Getting help
Search these pages with ⌘ K, ask an AI assistant about any page with **Copy page** or **Open in Claude**, or write to us from **Support** in the app. See [Contact support](/docs/help/support/).
---
# Quickstart
> Sign in with Google, open a starter flow, run it and find the result, in five minutes.
### Sign in
Open [app.chainz.waiyers.com](https://app.chainz.waiyers.com) and click **Continue with Google**. Your account and your wallet, with 100 welcome credits, are created on your first sign-in. Your first work goes into your personal project. See [Sign in](/docs/account/sign-in/).
### Create a flow from a starter
In the sidebar, open **Build › Flows** and click **New Flow**. Pick a starter, for example **Search the web and summarize**, or start from a blank canvas. The canvas opens in a new tab.
### Look at the components
Each box on the canvas is a component: here a Chat Input, a Web Search, a Model Call and a Chat Output. Lines link an output of one component to an input of the next. Click a component to see its settings, such as the model.
### Run it
Click **Playground** in the canvas toolbar, type a question and send it. Each step lights up as it runs, and the answer appears in the chat. On a phone, the flow opens as a form: fill in the inputs and tap **Run flow**.
### Find the result
Back in the app, open **Playground › History › Runs** to see the run, its steps, inputs and outputs, and the credits it used. Every result is also in **Build › Outputs**.
## Next steps
- [Schedule it](/docs/automate/schedules/) Run the flow every morning at 9.
- [Add your files](/docs/files/files/) Upload documents and use them in a flow.
- [Components](/docs/flows/components/) Everything you can place on the canvas.
- [Invite your team](/docs/account/team/) Share flows, files and credits.
---
# Key concepts
> Teams, projects and workspaces; flows, components and runs; credits. The words used everywhere in chainz.
## Team, project, workspace
Everything in chainz has a place, in three levels:
| Level | What it is |
|---|---|
| **Team** | People who work together. Members share the team's projects and its credits. |
| **Project** | A body of work, owned by you (**Personal**: only you have access, paid with your credits) or by a team (its members have access, paid with the team's credits). |
| **Workspace** | A space inside a project. Every flow, chat, file and schedule lives in exactly one workspace: the active one when it was created. |
The chip in the header shows where you are (**team / project · workspace**); click it to switch. See [Workspaces](/docs/account/workspaces/).
## Flow
A flow is a set of components linked on a canvas. When it runs, each component receives what the components before it produced, does its job and passes its result on. A flow can be run from the canvas, from the form view on a phone, on a schedule or from the API.
## Component
One step of a flow: a model call, a web search, reading a file, a condition, publishing a post. Components are grouped in the canvas's left panel by **Components** (categories such as Input / Output, Processing, Logic) and by **Bundles** (one per service, such as Models, Search, Files, Instagram). See [Components](/docs/flows/components/).
## Run
One execution of a flow. Every run, wherever it started (canvas, playground, schedule, API), is kept in **History › Runs** with its steps, inputs, outputs and cost. Every result of every component is in **Outputs**.
## Credits
AI calls are paid with credits: your own for personal projects, the team's for a team's projects. Building, editing and storing are free; only calls to models and paid tools use credits. See [Credits](/docs/account/credits/).
---
# Find your way around
> The sidebar sections of the chainz app and what each one is for.
The app is at [app.chainz.waiyers.com](https://app.chainz.waiyers.com). It works in a browser on a computer, a tablet or a phone.
## The sidebar
| Section | Pages | What for |
|---|---|---|
| **Playground** | Dashboard, History | Your overview (recent flows, credit balance, activity) and every run. |
| **Build** | Flows, Outputs, Files | Your flows, all their results, and the team's files. |
| **Organization** | Workspaces, Team | Where your work lives, and who you work with. |
| **Agenda** | Scheduled Runs | Flows that run on their own, as a calendar or a list. |
| **Chat** | Chat | Talk to any model: text, image, video, audio, music or 3D. |
| **Models** | Models | The model catalogue, with prices and capabilities. |
| **Search** | Web Search | Search the web and use the results in a flow. |
| **Social** | Instagram | Connect an account and publish. |
At the bottom: your credit balance and **Credits**, **Settings** and **Support**. Your avatar opens the menu with **Sign out**.
## The header
- **Workspace chip**: shows the current team, project and workspace; click to switch.
- **Theme**: light or dark.
- **Notifications and invitations**: invitations to a team arrive here.
## The canvas
The flow editor opens in its own browser tab, so you can keep the app open next to it. See [The canvas](/docs/flows/canvas/).
---
# Create a flow
> Start a flow from a blank canvas or a starter, and manage your flows from the Flows page.
## The Flows page
Open **Build › Flows**. It lists the flows of the current workspace. Search them with **Search flows...**. Each flow has a menu with:
- **Run**: start the flow with its saved inputs.
- **Schedule**: put it on the agenda (see [Scheduled runs](/docs/automate/schedules/)).
- **Rename** and **Delete**.
## Create a flow
### Click New Flow
On the Flows page, click **New Flow** (or **Create Flow** when the list is empty).
### Pick a starting point
Start from a blank canvas, or from a starter flow that already works and that you can change.
### Build on the canvas
The canvas opens in a new tab. Add components, link them and save. See [The canvas](/docs/flows/canvas/).
## Starter flows
| Starter | What it does |
|---|---|
| Chat with a model | A chat input, a model, a chat output: the simplest flow. |
| Search the web and summarize | Searches the web for your question and summarises the sources. |
| Translate | Translates a text into the language you choose. |
| Read a web page | Fetches a page and answers about its content. |
| Stock brief | Gets market data for a ticker and writes a short brief. |
| Instagram post from a topic | Writes a caption, generates an image and publishes the post. |
| Ask your knowledge base | Answers from documents you have added. |
| Knowledge Ingestion | Adds documents to a knowledge base. |
> [!TIP]
> Starters are the fastest way to learn: open one, click each component to see how it is set up, then change one thing at a time.
---
# The canvas
> Place components, link them, test each step and save. The left panel, the toolbar and the form view.
The canvas is where a flow is built. It opens in its own browser tab from the Flows page.
## The left panel
| Tab | What it shows |
|---|---|
| **Search** | Find a component by name or by what it takes and gives. `in:Message out:Data` lists components that take a message and return data. |
| **Components** | Every component by category: Input / Output, Data, Processing, Logic, Helpers. |
| **Bundles** | Components by service: Models, Search, Scrape, Files, Images, Instagram… |
| **Sticky Notes** | Notes to explain a flow to your team. |
Drag a component onto the canvas to add it.
## Link components
Each component has inputs on its left side and outputs on its right side. Drag from an output to an input of a compatible type to link them. When the flow runs, the output's value is passed to the input.
- A component runs when all the components linked to its inputs are done.
- Delete a link by selecting it and pressing Delete.
## Configure a component
Click a component to edit its fields: the model of a Model Call, the query kind of a Web Search (Web, News or Videos), the file of a Load File. A field linked to another component takes its value from that link instead.
## The toolbar
| Button | What it does |
|---|---|
| **Playground** | Opens the chat to run the flow. Needs a Chat Input or a Chat Output in the flow. |
| **Form** | Shows the flow as a form: inputs, run, results. See [Run a flow](/docs/flows/run/). |
| Workspace chip | The workspace the flow belongs to. |
| **Share** | API access, export, embed and shareable playground. See [Share a flow](/docs/flows/share/). |
> [!TIP]
> On a phone the canvas opens as the form view automatically. Use **Edit graph** to see the canvas itself.
---
# Components
> Everything you can place on the canvas, by bundle and by category.
Components are listed in the canvas's left panel two ways: **Bundles** (by service) and **Components** (by kind).
## Bundles
| Bundle | Components |
|---|---|
| **Models** | Model Call, Agent, Embed Text, Embeddings, Generate Media, Transcribe Audio |
| **Translate** | Translate |
| **Search** | Web Search (Web, News or Videos), RSS Feed, Ask |
| **Scrape** | Fetch URL, YouTube |
| **Structured** | Structured Output |
| **Images** | Generate Image |
| **Documents** | Document, Read Document |
| **Files** | List Files, Load File, Save File, Share File |
| **Finance** | Ticker |
| **Instagram** | Instagram Account, Publish to Instagram, Instagram Media, Instagram Insights, Instagram Comments |
| **Vectors** | Vector Store |
## Categories
### Input / Output
Chat Input, Chat Output, Text Input, Text Output. Where a run starts and what it returns.
### Data
API Request, Load CSV, Load JSON, Read File, Write File, Directory, SQL Database.
### Processing
Prompt Template (a text with variables filled from links), Parser, Split Text, Combine Text, Combine Data, Filter Data, Smart Transform, Regex Extractor, Batch Run, table operations, Python Interpreter.
### Logic
If-Else, Condition, Smart Router, Loop, Run Flow, Sub Flow, Flow as Tool, Listen, Notify, Pass.
### Helpers
Calculator, Current Date, ID Generator, Message History, Message Store, Create List, Output Parser.
## Agents and tools
An **Agent** decides by itself which tools to call to reach its goal. Link tool components to it (a Web Search, a Fetch URL, another flow with **Flow as Tool**) and it calls them as it needs them.
## Which components cost credits
Components that call a model or a paid service (Model Call, Agent, Generate Image, Generate Media, Transcribe Audio, Web Search, Embeddings…) use credits when they run. The others are free. See [Credits](/docs/account/credits/).
---
# Run a flow
> Run a flow from the canvas playground or the form view, run one step at a time, and stop a run.
## From the playground
Click **Playground** in the canvas toolbar. Type a message and send it: the message goes to the Chat Input, and the Chat Output's result comes back as the answer. Each conversation is kept; start another with **New Chat**.
This is how you talk to a flow: ask a reporting flow for September's figures, and get them back in the chat.
> [!NOTE]
> The playground needs a Chat Input or a Chat Output in the flow.
## From the form view
Click **Form** in the toolbar (it opens by itself on a phone). The form has sections:
| Section | What it holds |
|---|---|
| **Inputs** | The flow's input fields. |
| **Run** | **Run flow**, and **Stop** while it runs. Each step shows when it is done and how long it took. |
| **Results** | What the flow produced: text, images, files. |
| **Settings** | The components' main settings. |
| **Chat** | The playground chat, when the flow has one. |
Use **Edit graph** to go back to the canvas.
## Test one step
- **Run until here** runs the flow up to one component, so you can check its output before going further.
- **Freeze** keeps a component's last output and skips it in the next runs. Useful for a slow or costly step you are not changing.
## Other ways to run
- From **Build › Flows**, the flow's menu › **Run**.
- On a schedule: [Scheduled runs](/docs/automate/schedules/).
- From your code: [Run a flow over the API](/docs/api/run-a-flow/).
Every run, wherever it started, appears in [History](/docs/results/history/).
## When a run fails
The failing component shows its error. The most common ones are listed in [Troubleshooting](/docs/help/troubleshooting/).
---
# Share a flow
> The Share menu of the canvas: API access, export, embed into a site and the shareable playground.
Click **Share** in the canvas toolbar.
| Item | What it gives |
|---|---|
| **API access** | Ready-to-copy code to run the flow over HTTP. See [Run a flow](/docs/api/run-a-flow/). |
| **Export** | The flow as a JSON file, to keep a copy or import it elsewhere. |
| **Embed into site** | A snippet that puts the flow's chat on your web page. |
| **Shareable Playground** | A link that opens the flow's playground on its own. |
> [!WARNING]
> Runs started from an embed or a shared playground are charged to your team's credits like any other run.
## Share with your team
A flow belongs to a workspace, and a workspace to a team. To work on a flow together, keep it in a workspace of your team and invite people to that team. See [Team](/docs/account/team/).
---
# History
> Every run of your flows, from the canvas, the playground, the API or a schedule, with its steps, inputs, outputs and cost.
Open **Playground › History**. It has two tabs.
## Runs
Every run of your flows appears here, wherever it started: canvas, playground, API or schedule. Filter them with **All statuses**. Open a run to see:
- **Steps**: each component that ran, in order, with its status and duration.
- **Inputs** and **Outputs**: what went in and what came out.
- **Provider calls**: the model and service calls the run made, and the credits each one used ("No paid provider call" when it used none).
## Activity
The recent activity of your account, in time order.
> [!TIP]
> A scheduled run that failed shows here with the component that failed. Open it to see the error, fix the flow, and the next run picks up the change.
---
# Outputs
> Every result of every component of your flows, newest first, to download or reuse in another flow.
Open **Build › Outputs**. It lists every result of every component of your flows, newest first: texts, images, videos, audio, files.
## Filter
Use **All flows** to pick one flow and see only its results. Each result shows whether its component succeeded or failed. **Load more** shows older results.
## Reuse a result
- **Download** saves it to your computer. A value too large to show in the list can still be downloaded in full.
- **Use in a flow** sends it to a flow as an input, so the result of one flow can feed another.
---
# Chat
> Talk to any model of the catalogue, for text, images, video, audio, music and 3D, and send the results to a flow.
Open **Chat** in the sidebar. Pick a category, a model, and type in **Type a message...**.
| Category | What you get |
|---|---|
| Text | Answers, drafts, summaries, code. |
| Image | Generated images. |
| Video | Generated videos. |
| Audio | Speech. |
| Music | Generated music. |
| 3D | 3D models. |
Each reply shows what it cost. A result you like can go into a flow with **Use in a flow**.
> [!NOTE]
> The Chat page talks to a **model**. To talk to one of your **flows**, open it and use its playground: see [Run a flow](/docs/flows/run/).
## Use Chat to find the right model
Before putting a model in a flow, try the same prompt on two or three models here and compare the answers and their cost. Then pick it in the flow's Model Call.
---
# Models
> The model catalogue, with search, categories, free models, prices and capabilities.
Open **Models** in the sidebar. The catalogue lists every model you can use in Chat and in flows.
## Find a model
- **Search models...** by name or provider.
- **Categories**: text, image, video, audio and more.
- **Free**: only the models with no provider cost.
## Model details
Click a model to see:
- **Pricing**: the provider's price per million tokens (in and out), or per image or second.
- **Max output**: the longest answer it can give.
- **Supported Parameters**: the settings it accepts, such as temperature.
Click **Try in Playground** to chat with it right away.
## Default models
Set the models used by default in **Settings › Models**.
## What a call costs
See [Credits](/docs/account/credits/).
---
# Web Search
> Search the web from the app, find similar pages, read their contents and use the results in a flow.
Open **Search › Web Search**. Type a query and click **Search**.
For each result:
- **Find Similar**: pages like this one.
- **Get Contents**: the text of the page.
**Use the results in a flow** sends them to a flow as an input.
In a flow, the same search is the **Web Search** component (bundle Search), with the kinds Web, News and Videos. See [Components](/docs/flows/components/).
Searches use credits like model calls.
---
# Files
> Upload files or import them from Google Drive, find them, and use them in your flows.
Open **Build › Files**. Files belong to the current workspace.
## Add files
- **Upload** from your computer.
- **Import from Google Drive**: pick files from your Drive; they are copied into chainz.
## Find and manage
- **Search files...** by name.
- Each file's menu: **Rename**, **Delete**, **Use in a flow**.
## Use a file in a flow
Click **Use in a flow** on a file, or add a file component on the canvas:
| Component | What it does |
|---|---|
| **Load File** | Loads a stored file into the flow. |
| **Read Document** | Reads the text of a document. |
| **List Files** | Lists the files of the workspace, to loop over them. |
| **Save File** | Saves a result of the flow as a file. |
| **Share File** | Makes a link to a file. |
A flow can save its results with **Save File**, so they appear here for the whole team.
---
# Scheduled runs
> Run a flow once at a set time or on a recurring schedule, with its inputs, a timezone and a credit cap.
Open **Agenda › Scheduled Runs**. Your schedules show as a **Calendar** or a **List**.
## Schedule a flow
### Click Schedule Flow
Or, from **Build › Flows**, open a flow's menu and click **Schedule**.
### Pick the flow and the type
**One-time** runs once at the date and time you pick. **Recurring** runs again and again.
### Pick the frequency
Every hour, Daily at 9am, Weekdays at 9am, Weekly Monday 9am, or **Custom cron**.
### Set the advanced options (optional)
See the table below.
### Save
The schedule appears in the calendar. Each run lands in [History](/docs/results/history/).
## Advanced options
| Option | What it does |
|---|---|
| **Cron Expression** | Any schedule, in cron format. `0 9 * * 1-5` is 9:00 on weekdays. |
| **Timezone** | The timezone of the times above. |
| **Flow Inputs (JSON)** | The inputs of each run, for example `{"input_value": "Today's news on solar panels"}`. |
| **Max Credits** | The most credits one run may use. |
## Cron in short
A cron expression has five fields: minute, hour, day of month, month, day of week.
| Expression | Runs |
|---|---|
| `0 * * * *` | Every hour, on the hour |
| `0 9 * * *` | Every day at 9:00 |
| `30 8 * * 1` | Mondays at 8:30 |
| `0 18 1 * *` | The 1st of each month at 18:00 |
## Pause, resume, delete
Each schedule has **Pause**, **Resume** and **Delete**. A paused schedule keeps its settings and does not run.
> [!TIP]
> Set **Max Credits** on any schedule that calls models, so a change in a flow can never use more than you expect.
---
# Webhooks
> Starting a flow from another tool with a webhook URL. Not available yet; use the API in the meantime.
> [!IMPORTANT]
> Webhooks are not available yet. The **Webhook** component is listed in the canvas, but no webhook URL starts a flow today. This page will explain them when they open.
## In the meantime
Any tool that can send an HTTP request can start a flow through the API:
```bash
curl -X POST "https://app.chainz.waiyers.com/api/run/$FLOW_ID" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"input_value": "New order from Acme", "input_type": "chat", "output_type": "chat"}'
```
See [Run a flow](/docs/api/run-a-flow/) and [Authentication](/docs/api/authentication/).
For flows that should run at fixed times, use [Scheduled runs](/docs/automate/schedules/).
---
# Instagram
> Connect an Instagram professional account, publish posts from the app or from a flow, and read their numbers.
## Connect your account
Open **Social › Instagram** and click **Connect Instagram**. Sign in to Instagram and allow chainz to publish for you. The account then also shows in **Settings › Accounts**.
> [!NOTE]
> Publishing needs an Instagram **professional** account (business or creator).
## Publish from the app
Click **Publish a Post**, give the image's **Media URL** and the **Caption**, and publish. A caption holds up to 2,200 characters and 30 hashtags.
## Publish from a flow
The **Instagram** bundle of the canvas has:
| Component | What it does |
|---|---|
| **Instagram Account** | The connected account a flow uses. |
| **Publish to Instagram** | Publishes an image with its caption. |
| **Instagram Media** | Lists your posts. |
| **Instagram Insights** | Reads the numbers of your account and posts. |
| **Instagram Comments** | Reads the comments of a post. |
The starter **Instagram post from a topic** writes a caption, generates an image and publishes the post in one run.
## Disconnect
Click **Disconnect** on the Instagram page. Flows that publish stop working until you connect again.
If the page says "Instagram is not configured on this environment", Instagram is not available on that version of the app.
---
# LinkedIn
> Post to LinkedIn from a flow. Coming to chainz soon.
> [!IMPORTANT]
> LinkedIn is coming to chainz and is not in the app yet. This page will describe it when it opens.
What is planned:
- A **Social › LinkedIn** page to connect, reconnect and disconnect your account.
- A **LinkedIn** bundle on the canvas: **LinkedIn Account** and **Post to LinkedIn**.
Your waiyers account can already link LinkedIn under **Connections** on [account.waiyers.com](https://account.waiyers.com).
---
# Sign in
> Sign in to chainz with your Google account, through the sign-in shared by the waiyers apps.
Open [app.chainz.waiyers.com](https://app.chainz.waiyers.com) and click **Continue with Google**.
chainz uses the sign-in shared by the waiyers apps: the same Google account works in memo, chainz and the others, and [account.waiyers.com](https://account.waiyers.com) is where you manage it.
## Your first sign-in
- Your account is created with your Google e-mail, name and picture.
- Your wallet is created with **100 welcome credits**, to try models and flows.
- Your work starts in your personal project, which only you can see.
## Sign out
Click your avatar at the bottom of the sidebar, then **Sign out**.
## Trouble signing in
See [Troubleshooting](/docs/help/troubleshooting/#i-cannot-sign-in).
---
# Workspaces
> How your work is organized in projects and workspaces, who it is shared with and whose credits pay for it.
Open **Organization › Workspaces**. The page shows how your work is organized: who it is shared with, whose credits pay for it, and where each flow, chat and file lives.
## Projects
- **Your projects** (Personal): only you have access, paid with your credits.
- **Team projects**: shared with the team's members, paid with the team's credits.
Click **New project** to create one, in your name or in a team.
## Workspaces
A project holds one or more workspaces. Each card shows how many flows, chats, files and schedules it holds.
- **New workspace** creates one in a project.
- **Switch here** makes it the active workspace: what you create next goes into it.
- **Open flows** switches to it and opens its flows.
You can also switch from the chip in the header.
> [!TIP]
> Use one project per client or activity, and workspaces for its parts (for example "Social", "Reports"). Flows, files and schedules stay where they were created.
---
# Team
> Create a team, invite people by e-mail with a role, and share projects and credits.
Open **Organization › Team**. A team shares projects with other people: members work in the team's projects and their workspaces, and the team's credits pay for them.
## Create a team
Click **New team** and give it a name. You are its **Owner**.
## Invite people
### Open the team
Under **Members**, find **Invite by e-mail**.
### Enter the e-mail and the role
Type the person's e-mail address, pick a role, and click **Invite**.
### They accept
The invitation shows in their header notifications and on their Team page, under **Invitations for you**, with **Accept** and **Decline**. It expires after a while; pending ones are listed under **Pending invitations**, where you can revoke them.
## Roles
| Role | For |
|---|---|
| **Owner** | Created the team. Manages it and its billing, and can delete it. |
| **Admin** | Manages the team's billing: buys the team's credits. |
| **Member** | Works in the team's projects, paid with the team's credits. |
| **Viewer** | Has access to the team's projects. |
## Leave or delete
- **Leave team**: you lose access to its projects.
- **Delete team** (Owner): its projects, workspaces and everything in them are deleted for every member. This cannot be undone.
---
# Settings
> The Settings tabs of chainz: profile, appearance, security, notifications, default models, connected accounts, API keys and data.
Open **Settings** at the bottom of the sidebar.
| Tab | What you set there |
|---|---|
| **General** | Your profile. |
| **Appearance** | Light or dark theme. |
| **Security** | Your sign-in. |
| **Notifications** | What chainz tells you about. |
| **Models** | The models used by default. |
| **Accounts** | Connected accounts, such as Instagram. |
| **API Keys** | Keys for your own code. See the note below. |
| **Privacy & Data** | What chainz keeps about you. |
| **Legal** | Terms and privacy policy. |
> [!NOTE]
> API keys created in Settings cannot run flows yet. To call the API, use your sign-in token: see [Authentication](/docs/api/authentication/).
---
# Credits
> How AI calls are paid with credits, what costs credits and what is free, and how to buy more.
AI calls in chainz are paid with **credits**. Building flows, editing them, storing files and managing schedules are free; only calls to models and paid services use credits.
## Whose credits
- Work in your **personal** projects uses your own credits.
- Work in a **team** project uses the team's credits. A team's **Owner** or **Admin** buys them.
Your balance shows at the bottom of the sidebar. Click it, or **Credits**, to open **Credits & Billing**.
## What a call costs
Each call is charged from what the provider charges for it, plus a small platform margin, rounded up to the next credit. Every call costs at least 1 credit. The [model catalogue](/docs/ai/models/) shows each model's provider price, and every run's **Provider calls** in [History](/docs/results/history/) show what it actually used.
Welcome credits: **100** on your first sign-in. Credits do not expire.
## Buy credits
### Set up billing
The first time, click **Set Up Billing Account** and enter your billing e-mail.
### Pick a pack
Open the **Credits** tab and pick a pack. The packs and their prices are shown there.
### Pay
Click **Purchase Credits**. Payment is handled by Stripe; the credits arrive as soon as the payment is confirmed and show in your recent transactions.
## Keep costs in check
- Set **Max Credits** on scheduled runs ([Scheduled runs](/docs/automate/schedules/)).
- Use **Freeze** on a costly step while you work on the rest of a flow ([Run a flow](/docs/flows/run/)).
- Try prompts on free or small models in [Chat](/docs/ai/chat/) before picking one for a flow.
---
# FAQ
> Short answers to the questions asked most about chainz.
## Do I need to code?
No. Flows are built by placing and linking components on a canvas. Developers can also run flows over the [API](/docs/api/overview/).
## Which models can I use?
Every model of the [catalogue](/docs/ai/models/), from free open models to the large commercial ones, for text, images, video, audio, music and 3D.
## What costs credits?
Calls to models and paid services. Building, editing, storing files and scheduling are free. See [Credits](/docs/account/credits/).
## Do credits expire?
No.
## Can my team share flows and credits?
Yes. Create a team, invite people and work in the team's projects: they share its flows, files and credits. See [Team](/docs/account/team/).
## Can a flow run without me?
Yes, on a schedule: see [Scheduled runs](/docs/automate/schedules/). From your own code: see [Run a flow](/docs/api/run-a-flow/). Webhooks are [not available yet](/docs/automate/webhooks/).
## Can I use chainz on my phone?
Yes. The app works in a phone's browser, and flows open as a form there, so you can fill in inputs and run them.
## Which account do I sign in with?
Your Google account, through the sign-in shared by the waiyers apps. See [Sign in](/docs/account/sign-in/).
## Where are my files?
In the workspace where you uploaded them, under **Build › Files**. See [Files](/docs/files/files/).
---
# Troubleshooting
> What to do when sign-in fails, a run stops with an error, credits run out or a schedule does not run.
## I cannot sign in
- Use **Continue with Google** with the Google account you signed up with.
- If your browser blocks cookies for `app.chainz.waiyers.com` or `waiyers.com`, allow them: the sign-in needs them.
- Still stuck: write to us (see [Contact support](/docs/help/support/)) with the e-mail you use.
## A run fails with "Insufficient credits"
The wallet paying for the run is empty: yours for a personal project, the team's for a team project. Buy credits in **Credits** and run again. See [Credits](/docs/account/credits/).
## A component shows an error
1. Open the run in **Playground › History › Runs**: the failing step and its message are shown there.
2. Check the component's fields: a missing input, a link to the wrong type, a file that was deleted.
3. Use **Run until here** on the component before it to check what it receives.
## The Playground button does nothing
The playground needs a **Chat Input** or a **Chat Output** in the flow. Add one, or use **Form** instead.
## A scheduled run did not happen
- Check that the schedule is not paused in **Agenda › Scheduled Runs**.
- Check its **Timezone**.
- Check **History** for a failed run, and the wallet's balance.
- If the schedule has **Max Credits**, check that it is enough for what the flow does.
## Instagram does not publish
- The account must be a **professional** account.
- Reconnect it in **Social › Instagram**; the authorization may have expired.
- A caption holds at most 2,200 characters and 30 hashtags.
## The API returns 401
Your token expired. Get a new one: see [Authentication](/docs/api/authentication/).
---
# Contact support
> How to reach the chainz team, and what to include so we can help quickly.
## From the app
Click **Support** at the bottom of the sidebar. Choose an **Issue Type** (General, Bug Report, Feature Request, Account…), describe your issue and click **Submit**. Our team receives it by e-mail.
## By e-mail
Write to [contact@waiyers.com](mailto:contact@waiyers.com?subject=chainz%20help).
## What to include
- What you were doing and what you expected.
- The name of the flow, and the time of the run if it failed (from **History**).
- The error message, or a screenshot.
- The e-mail you sign in with.
## Ask an AI about the docs
On every page of these docs, the menu next to **Copy page** opens the page in ChatGPT or Claude so you can ask questions about it. AI assistants can read all the docs at once from [llms-full.txt](/llms-full.txt).
---
# API overview
> Run your chainz flows and manage their schedules over HTTP, with the same sign-in and the same credits as the app.
Everything you build in chainz can be called over HTTP, through the same gateway as the app. Calls are charged in credits exactly as in the app.
## Base URL
```text
https://app.chainz.waiyers.com
```
## In short
### Get a token
Sign in to chainz and get your token from `/api/auth/token`. See [Authentication](/docs/api/authentication/).
### Find your flow's id
Open the flow on the canvas: its id is in the address bar, after `/flow/`.
### Run it
`POST /api/run/{flow}` with the input. See [Run a flow](/docs/api/run-a-flow/).
## Endpoints
| Method | Path | What it does |
|---|---|---|
| `POST` | `/api/run/{flow_id_or_name}` | Run a flow and get its outputs. |
| `GET` | `/api/flows/` | List your flows. |
| `GET` | `/api/flows/{flow_id}` | One flow, with its components and links. |
| `GET` | `/api/schedules/` | List the schedules. |
| `POST` | `/api/schedules/` | Schedule a flow. |
| `GET`, `PATCH`, `DELETE` | `/api/schedules/{schedule_id}` | Read, change, pause or delete a schedule. |
## Workspaces
Requests act in your active workspace (the one picked in the app). To act in another one, send its id in the `X-Workspace-Id` header.
## Ready-made code
On the canvas, **Share › API access** gives the code to run that flow, ready to copy.
---
# Authentication
> Every API call carries your chainz sign-in token as a bearer token. How to get it and renew it.
Every call carries your sign-in token in the `Authorization` header:
```http
Authorization: Bearer
```
## Get your token
While signed in to chainz in your browser, open:
```text
https://app.chainz.waiyers.com/api/auth/token
```
The answer is JSON; the token is the `idToken` field. From a script, send your session cookie:
```bash
TOKEN=$(curl -s https://app.chainz.waiyers.com/api/auth/token \
--cookie "next-auth.session-token=$SESSION" | jq -r .idToken)
```
`$SESSION` is the value of the `next-auth.session-token` cookie of `app.chainz.waiyers.com` (your browser's developer tools › Application › Cookies).
> [!WARNING]
> The token acts as you: anyone who has it can run your flows and spend your credits. Keep it out of code repositories and shared documents.
## Expiry
The token expires like your session. When a call returns `401`, get a new one.
## API keys
**Settings › API Keys** can create keys, but they do not run flows yet. Use the token above until they do; this page will say when.
## Browsers
`/api/auth/token` only answers pages of `app.chainz.waiyers.com` itself: a script on another website cannot read your token.
---
# Run a flow
> POST /api/run/{flow} runs a flow with an input, optional tweaks and a session, and returns or streams its outputs.
```http
POST /api/run/{flow_id_or_name}
```
`{flow_id_or_name}` is the flow's id (in the canvas address bar) or its endpoint name.
## Example
```bash
curl -X POST "https://app.chainz.waiyers.com/api/run/$FLOW_ID" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input_value": "Summarise the news about solar panels",
"input_type": "chat",
"output_type": "chat"
}'
```
## Body
| Field | Type | What it is |
|---|---|---|
| `input_value` | string | The value given to the flow's input component. |
| `input_type` | string | Which input component receives the value: `chat` (default), `text` or `any`. |
| `output_type` | string | Which outputs to return: `chat` (default), `text`, `any` or `debug` (every component's output). |
| `output_component` | string | When the flow has several outputs, the id of the one to return. |
| `tweaks` | object | Settings to change for this run only, keyed by component id. |
| `session_id` | string | Keeps a conversation going across runs: send the same id each time. |
## Tweaks
Change a component's setting for one run, without editing the flow. The key is the component's id (its type and a short code, as in [Get a flow](/docs/api/flows/#get-a-flow)), the value its fields:
```json
{
"input_value": "Write a caption for our new bottle",
"tweaks": {
"WaiyersModelCall-a1b2c": { "temperature": 0.2 }
}
}
```
## Streaming
Add `?stream=true` to receive the result as it is produced, as server-sent events:
| Event | Carries |
|---|---|
| `add_message` | A new message of the run. |
| `token` | A piece of text, as the model writes it. |
| `end` | The final result. |
## Who can run a flow
You, and the members of the team that owns the flow's workspace. Others get `403`.
## Cost
A run through the API costs the same as in the app and appears in **History** with the others. See [Credits](/docs/account/credits/).
---
# Flows
> List your flows and read one flow with its components and links.
## List flows
```http
GET /api/flows/
```
Returns the flows of the active workspace (or of `X-Workspace-Id`), with their id, name and description.
```bash
curl -s "https://app.chainz.waiyers.com/api/flows/" -H "Authorization: Bearer $TOKEN"
```
## Get a flow
```http
GET /api/flows/{flow_id}
```
Returns the flow with its components and links. Useful to find the component ids to use in [tweaks](/docs/api/run-a-flow/#tweaks).
---
# Schedules
> Create, list, change, pause and delete the scheduled runs of your flows.
The same schedules as **Agenda › Scheduled Runs** in the app. See [Scheduled runs](/docs/automate/schedules/).
## Create a schedule
```http
POST /api/schedules/
```
```bash
curl -X POST "https://app.chainz.waiyers.com/api/schedules/" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"flow_id": "'"$FLOW_ID"'",
"schedule_type": "recurring",
"cron_expression": "0 9 * * 1-5",
"timezone": "Europe/Paris",
"inputs": { "input_value": "Today'"'"'s news on solar panels" },
"max_credits": 50
}'
```
| Field | Type | What it is |
|---|---|---|
| `flow_id` | string | The flow to run. Required. |
| `schedule_type` | string | `once` (default) or `recurring`. |
| `scheduled_at` | string | For `once`: the date and time, ISO 8601. |
| `cron_expression` | string | For `recurring`: when to run, in cron format. |
| `timezone` | string | The timezone of the times, e.g. `Europe/Paris`. Default `UTC`. |
| `inputs` | object | The inputs of each run. |
| `max_credits` | integer | The most credits one run may use. |
Returns the schedule with its `id` and `status`.
## List schedules
```http
GET /api/schedules/?flow_id=…&status=…
```
Both filters are optional.
## Read, change, delete
```http
GET /api/schedules/{schedule_id}
PATCH /api/schedules/{schedule_id}
DELETE /api/schedules/{schedule_id}
```
`PATCH` takes any field of the creation body, plus `status`. Pause with `{"status": "paused"}`, resume with `{"status": "active"}`.
## Statuses
| Status | Meaning |
|---|---|
| `active` | Will run at its next time. |
| `paused` | Kept, does not run. |
| `completed` | A one-time schedule that has run. |
| `cancelled` | Stopped for good. |
| `failed` | Its last run failed. |
---
# Errors
> The HTTP status codes the chainz API returns and what to do about each.
| Status | Meaning | What to do |
|---|---|---|
| `400` | The body is not valid: a missing or wrongly typed field. | Check the body against the endpoint's table. |
| `401` | No token, or an expired one. | Get a new token: [Authentication](/docs/api/authentication/). |
| `403` | The flow or schedule belongs to a workspace you are not a member of. | Check the flow id and the `X-Workspace-Id` header. |
| `404` | No flow or schedule with that id or name. | Check the id in the canvas address bar. |
| `500` | The run failed inside a component. | The detail says which; the run is also in **History**. |
## Insufficient credits
When the wallet paying for the run is empty, the model component fails with an **Insufficient credits** message in the run's output. Top up in **Credits** and run again. See [Credits](/docs/account/credits/).