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

# Create AskFred Thread

> Create a new AskFred conversation thread with a question about your meetings

## Overview

The `createAskFredThread` mutation allows you to start a new AskFred conversation by asking questions about your meeting transcripts. You can ask about a specific meeting or search across multiple meetings using filters. AskFred uses AI to analyze your meeting data and provide intelligent, context-aware answers.

## Arguments

**input** `CreateAskFredThreadInput`

**query** `String` *required*

Your question or query about the meeting(s). Maximum 2000 characters.

**transcript\_id** `String`

ID of a specific transcript/meeting to query. If provided, the question will be answered based only on this meeting.

**filters** `AskFredMeetingFiltersInput`

Filters to search across multiple meetings. Only used if transcript\_id is not provided.

**start\_time** `String`

Filter meetings from this date/time (ISO 8601 format). Cannot be more than 1 year in the past. If not provided, defaults to 30 days before end\_time.

**end\_time** `String`

Filter meetings until this date/time (ISO 8601 format). If not provided, defaults to today.

**channel\_ids** `[String]`

Filter by specific channel/integration IDs

**organizers** `[String]`

Filter by meeting organizer email addresses

**participants** `[String]`

Filter by participant email addresses

**transcript\_ids** `[String]`

Filter by specific transcript IDs

**response\_language** `LanguageCode`

Language code for the response (e.g., 'en' for English, 'es' for Spanish). See [Language Codes](https://docs.fireflies.ai/miscellaneous/language-codes.md) for full list.

**format\_mode** `FormatMode`

Response format: 'markdown' for rich formatting or 'plaintext' for simple text

**generate\_suggestions** `Boolean`

Whether to generate suggested follow-up queries (`suggested_queries`) for the response. When omitted, this is inferred from whether your query selects the `suggested_queries` field. Set to `false` to skip generation for a faster response — `suggested_queries` is then returned as `null`. Setting `true` always generates them (adding some latency); if you don't also select `suggested_queries`, they're generated but not returned, so only set `true` when you intend to read the field.

## Returns

Returns an `AskFredResponse` object containing the generated message with the answer to your query.

## Usage Example

### Query a Specific Meeting

```graphql theme={null}
mutation CreateThreadForMeeting($input: CreateAskFredThreadInput!) {
  createAskFredThread(input: $input) {
    message {
      id
      thread_id
      query
      answer
      suggested_queries
      status
      created_at
    }
  }
}
```

### Query Across Multiple Meetings

```graphql theme={null}
mutation CreateThreadWithFilters($input: CreateAskFredThreadInput!) {
  createAskFredThread(input: $input) {
    message {
      id
      thread_id
      query
      answer
      suggested_queries
      status
    }
  }
}
```

```bash curl theme={null}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation CreateThread($input: CreateAskFredThreadInput!) { createAskFredThread(input: $input) { message { id thread_id query answer suggested_queries status } } }",
    "variables": {
      "input": {
        "query": "What were the main decisions made in the product planning meeting?",
        "transcript_id": "transcript_xyz789",
        "response_language": "en",
        "format_mode": "markdown"
      }
    }
  }' \
  https://api.fireflies.ai/graphql
```

```javascript javascript theme={null}
const axios = require('axios');

const url = 'https://api.fireflies.ai/graphql';
const headers = {
  'Content-Type': 'application/json',
  Authorization: 'Bearer your_api_key'
};

// Example 1: Query a specific meeting
const inputForSpecificMeeting = {
  query: "What were the action items discussed?",
  transcript_id: "transcript_xyz789",
  response_language: "en",
  format_mode: "markdown"
};

// Example 2: Query across meetings with filters
const inputWithFilters = {
  query: "What customer concerns were raised this week?",
  filters: {
    start_time: "2024-03-10T00:00:00Z",
    end_time: "2024-03-17T00:00:00Z",
    participants: ["customer@example.com"]
  },
  response_language: "en",
  format_mode: "markdown"
};

const data = {
  query: `
    mutation CreateAskFredThread($input: CreateAskFredThreadInput!) {
      createAskFredThread(input: $input) {
        message {
          id
          thread_id
          query
          answer
          suggested_queries
          status
          created_at
        }
      }
    }
  `,
  variables: { input: inputForSpecificMeeting }
};

axios
  .post(url, data, { headers: headers })
  .then(result => {
    console.log(result.data);
  })
  .catch(e => {
    console.error(e);
  });
```

```python python theme={null}
import requests

url = 'https://api.fireflies.ai/graphql'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_key'
}

# Example 1: Query a specific meeting
input_specific = {
    "query": "What were the action items discussed?",
    "transcript_id": "transcript_xyz789",
    "response_language": "en",
    "format_mode": "markdown"
}

# Example 2: Query across meetings with filters
input_filtered = {
    "query": "What customer concerns were raised this week?",
    "filters": {
        "start_time": "2024-03-10T00:00:00Z",
        "end_time": "2024-03-17T00:00:00Z",
        "participants": ["customer@example.com"]
    },
    "response_language": "en",
    "format_mode": "markdown"
}

query = '''
    mutation CreateAskFredThread($input: CreateAskFredThreadInput!) {
        createAskFredThread(input: $input) {
            message {
                id
                thread_id
                query
                answer
                suggested_queries
                status
                created_at
            }
        }
    }
'''

data = {
    'query': query,
    'variables': {'input': input_specific}
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    print(response.json())
else:
    print(response.text)
```

```json Response theme={null}
{
  "data": {
    "createAskFredThread": {
      "message": {
        "id": "msg_001",
        "thread_id": "thread_new123",
        "query": "What were the main decisions made in the product planning meeting?",
        "answer": "Based on the product planning meeting transcript, here are the main decisions made:\n\n## Product Roadmap\n- **Q4 Focus**: Prioritize mobile app improvements and API v2 development\n- **Feature Freeze**: No new features after November 15th to focus on stability\n\n## Resource Allocation\n- **Team Expansion**: Approved hiring 2 senior engineers and 1 UX designer\n- **Budget**: Allocated $150K for Q4 development initiatives\n\n## Timeline\n- **Beta Release**: Scheduled for December 1st\n- **Public Launch**: Targeted for January 15th\n\n## Strategic Partnerships\n- **Integration Partners**: Approved partnerships with Slack and Microsoft Teams\n- **API Access**: Will provide early access to 5 strategic partners",
        "suggested_queries": [
          "What specific mobile app improvements were discussed?",
          "Who will be responsible for the API v2 development?",
          "What were the concerns raised about the timeline?"
        ],
        "status": "completed",
        "created_at": "2024-03-15T10:30:00Z"
      }
    }
  }
}
```

## Error Codes

> [accordion] invalid\_arguments
>
> Validation error occurred. Common causes:
>
> <ul>
>   <li>Query exceeds 2000 character limit or is empty</li>
>   <li>Both transcript\_id and filters are provided (only one is allowed)</li>
>   <li>start\_time is more than 1 year in the past</li>
>   <li>start\_time is not before end\_time</li>
> </ul>

> [accordion] object\_not\_found
>
> The specified transcript\_id does not exist or you don't have access to it

> [accordion] require\_ai\_credits
>
> You don't have access to AI credits. Upgrade your plan to use AskFred.

> [accordion] invalid\_language\_code
>
> The provided response\_language code is not supported. See [Language Codes](https://docs.fireflies.ai/miscellaneous/language-codes.md) for valid options.

## Audit Trail

A successful call records a [`ASKFRED_THREAD_CREATED`](https://docs.fireflies.ai/graphql-api/query/audit-events) audit event for the thread with its meeting ID and message ID in metadata.

## Related

> [card] [Continue Thread](https://docs.fireflies.ai/graphql-api/mutation/continue-askfred-thread.md)
>
> Add follow-up questions to continue the conversation

> [card] [List Threads](https://docs.fireflies.ai/graphql-api/query/askfred-threads.md)
>
> View all your AskFred conversation threads


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