> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qxlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a flow

> Read a flow's nodes, the fields its input nodes take, and how the nodes connect.



## OpenAPI

````yaml api-reference/openapi.yaml GET /v1/flows/{flow_id}
openapi: 3.0.3
info:
  title: QX API
  version: '1.0'
  description: >-
    Run what you build in QX from your own code. Message agents, execute flows
    and grids, and read their results.
servers:
  - url: https://api.qxlabs.com
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: >-
      Message agents through OpenAI's Responses API, so OpenAI's SDKs work with
      a QX API key.
  - name: Flows
    description: Execute flows and follow their executions.
  - name: Grids
    description: Execute grids, follow their executions and read their rows.
paths:
  /v1/flows/{flow_id}:
    get:
      tags:
        - Flows
      summary: Get a flow
      description: >
        Returns what you need before executing a flow: its nodes, the fields
        each input node takes, and how the nodes connect.

        Send `inputs` to the execute endpoint keyed by input node ID and then by
        field name, with a value for each field.

        Prompts, credentials and other node settings are never returned.
      operationId: getFlow
      parameters:
        - name: flow_id
          in: path
          required: true
          schema:
            type: string
          description: The flow's ID, as shown in its URL in the app
          example: c71a5f0e1d2b4a7e9a513f6f0d2b8e10
      responses:
        '200':
          description: The flow
          content:
            application/json:
              schema:
                type: object
                properties:
                  flow_id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  nodes:
                    type: array
                    description: Every node in the flow
                    items:
                      type: object
                      properties:
                        node_id:
                          type: string
                        type:
                          type: string
                          description: The node type, for example LLMNode
                        label:
                          type: string
                          nullable: true
                          description: The name given to the node in the app
                        batch:
                          type: boolean
                          description: >-
                            Whether the node executes once per item, which makes
                            its outputs lists
                        fields:
                          type: object
                          nullable: true
                          description: >
                            For input nodes (`UserInputNode`), the node's fields
                            keyed by field name. Null for other nodes.

                            Each field has `type` (text, textarea, number,
                            boolean, date, dropdown, multi_select, multi_input,
                            file or special_select), `required`, `description`,
                            `choices` (for dropdown and multi_select) and
                            `default_value`.
                  edges:
                    type: array
                    description: >-
                      Which node feeds which. A branch node has one edge per
                      branch
                    items:
                      type: object
                      properties:
                        source:
                          type: string
                        target:
                          type: string
              example:
                flow_id: c71a5f0e1d2b4a7e9a513f6f0d2b8e10
                name: Lead enrichment
                description: Researches a company and writes a summary
                nodes:
                  - node_id: UserInputNodex7q2m9ka4
                    type: UserInputNode
                    label: Company details
                    batch: false
                    fields:
                      Company Name:
                        type: text
                        required: true
                        description: null
                        choices: null
                        default_value: null
                      Size:
                        type: dropdown
                        required: false
                        description: null
                        choices:
                          - 1-50
                          - 51-500
                          - 500+
                        default_value: 1-50
                  - node_id: LLMNodek3x9m2pqa1
                    type: LLMNode
                    label: Write summary
                    batch: false
                    fields: null
                edges:
                  - source: UserInputNodex7q2m9ka4
                    target: LLMNodek3x9m2pqa1
        '403':
          description: The flow is in your org but isn't shared with you
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: There's no such flow, or it belongs to another org
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Read rate limit exceeded for flows endpoints
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl
            https://api.qxlabs.com/v1/flows/c71a5f0e1d2b4a7e9a513f6f0d2b8e10 \
              -H "Authorization: Bearer <YOUR_QX_API_KEY>"
        - lang: python
          label: Python
          source: >
            import requests


            headers = {"Authorization": "Bearer <YOUR_QX_API_KEY>"}


            flow =
            requests.get("https://api.qxlabs.com/v1/flows/c71a5f0e1d2b4a7e9a513f6f0d2b8e10",
            headers=headers).json()

            for node in flow["nodes"]:
                if node["fields"]:
                    print(node["node_id"], list(node["fields"]))
        - lang: typescript
          label: TypeScript
          source: >
            const headers = { Authorization: "Bearer <YOUR_QX_API_KEY>" };


            const response = await
            fetch("https://api.qxlabs.com/v1/flows/c71a5f0e1d2b4a7e9a513f6f0d2b8e10",
            { headers });

            const flow = await response.json();

            for (const node of flow.nodes) {
              if (node.fields) console.log(node.node_id, Object.keys(node.fields));
            }
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your QX API key. The `X-API-Key` header works too

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.