← Developer DocsAPI Process Flow

Get Results

Fetch the finished protocol with all agenda items, texts and task items.

This is the final call in the main API process flow. Use the getResults query to retrieve all AI-generated items for a given protocol — including protocol metadata, agenda items, and task items.

If creationDone is false, processing is still ongoing. Check the creatingStep field of ApiProtocolType for the current phase.


GraphQL Query

fragment protocolDetails on ApiProtocolType {
  slug
  name
  date
  language
  empty
  creatingStep
  status
  renamedSpeakers
}

fragment agendaDetails on ApiAgendaItemType {
  id
  classType
  title
  depth
  maxDepth
  metaData
  # legacy fields
  textList
  resolutionList {
    resolution
    decision
  }
  createdAt
  updatedAt
}

fragment taskDetails on ApiTaskType {
  id
  text
  date
  assignedTo
  done
  createdAt
  updatedAt
}

query GetResults($protocolSlug: String!) {
  getResults(protocolSlug: $protocolSlug) {
    creationDone
    protocol {
      ...protocolDetails
    }
    agendaItemList {
      ...agendaDetails
    }
    taskItemList {
      ...taskDetails
    }
  }
}

Query Variables

{
  "protocolSlug": "PROTOCOL_SLUG"
}

Example JavaScript Implementation

import axios from "axios";

async function getResults(protocolSlug) {
  const res = await axios({
    method: "POST",
    url: "https://api-v2.speechmind.com/external/v2/graphql",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": process.env.SPEECHMIND_API_KEY,
    },
    data: JSON.stringify({
      query: GET_RESULTS,
      variables: { protocolSlug },
    }),
  });

  const { creationDone, protocol, agendaItemList, taskItemList } = res.data.data.getResults;

  return { creationDone, protocol, agendaItemList, taskItemList };
}

Notes

  • Poll this query every 5–10 seconds until creationDone becomes true. Total processing time is typically ~40% of the audio duration (e.g. a 60-minute recording takes ~24 minutes).
  • The creatingStep field shows which phase the AI is currently processing.
  • agendaItem.textList has different detail levels. For summary the correct textList looks like {"0": [...]}. For politics it looks like {"0": [...], "1": [...], "2": [...]}. An empty value {} means the AI could not map content to that item.