Chat with YouTube Video
Engage in interactive conversations about YouTube videos using advanced AI models through the 1min.AI API. This feature allows you to analyze video content, ask questions, extract insights, and discuss specific aspects of YouTube videos with AI assistants.
Available Models
Loading available models...
Key Features
- Video Analysis: Ask questions about any YouTube video content
- Content Extraction: Get insights, summaries, and explanations from video content
- Interactive Chat: Maintain context across multiple questions about the same video
- Multi-language Support: Chat in multiple languages regardless of video language
- Advanced AI Models: Powered by state-of-the-art language models with video understanding capabilities
Request Parameters
All models share the same request structure:
| Field Name | Type | Supported Value | Description | Required |
|---|---|---|---|---|
| type | text | CHAT_WITH_YOUTUBE_VIDEO | Feature name | ✔️ |
| model | text | See available models | Model identifier | ✔️ |
| conversationId | string | UUID from conversation API | Conversation UUID obtained from /api/conversations | ✔️ |
| promptObject.prompt | string | Your question | Your question or message about the video | ✔️ |
Getting Started
To chat with a YouTube video, you must follow these steps:
- Create a Conversation: Use the Conversation API to create a conversation with
type: "CHAT_WITH_YOUTUBE_VIDEO"and include theyoutubeUrl - Get Conversation ID: The API returns a conversation object with a
uuidfield - Start Chatting: Use the
uuidasconversationIdin your feature requests to ask questions about the video
API Reference
Step 1: Create Conversation
Step 2: Chat with Video
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Request Parameters
| Field Name | Type | Description | Required |
|---|---|---|---|
| type | string | Must be "CHAT_WITH_YOUTUBE_VIDEO" | ✔️ |
| model | string | AI model identifier | ✔️ |
| conversationId | string | Conversation UUID obtained from the Conversation API. You must create a conversation first using /api/conversations with type: "CHAT_WITH_YOUTUBE_VIDEO" and youtubeUrl | ✔️ |
| promptObject.prompt | string | Your question or message about the video | ✔️ |
Code Examples
- cURL - Step 1: Create Conversation
- cURL - Step 2: Chat with Video
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/conversations' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "CHAT_WITH_YOUTUBE_VIDEO",
"title": "My YouTube Video Chat",
"model": "gpt-4o",
"youtubeUrl": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}'
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "CHAT_WITH_YOUTUBE_VIDEO",
"model": "gpt-4o",
"conversationId": "<conversation-uuid-from-step-1>",
"promptObject": {
"prompt": "Can you summarize the main points discussed in this video?"
}
}'
// Step 1: Create conversation
const createConversation = await fetch('https://api.1min.ai/api/conversations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'CHAT_WITH_YOUTUBE_VIDEO',
title: 'My YouTube Video Chat',
model: 'gpt-4o',
youtubeUrl: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
})
});
const conversation = await createConversation.json();
const conversationId = conversation.uuid;
// Step 2: Chat with video
const chatResponse = await fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'CHAT_WITH_YOUTUBE_VIDEO',
model: 'gpt-4o',
conversationId: conversationId,
promptObject: {
prompt: 'Can you summarize the main points discussed in this video?'
}
})
});
import requests
# Step 1: Create conversation
conversation_response = requests.post(
'https://api.1min.ai/api/conversations',
headers={
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
json={
'type': 'CHAT_WITH_YOUTUBE_VIDEO',
'title': 'My YouTube Video Chat',
'model': 'gpt-4o',
'youtubeUrl': 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
}
)
conversation = conversation_response.json()
conversation_id = conversation['uuid']
# Step 2: Chat with video
chat_response = requests.post(
'https://api.1min.ai/api/features',
headers={
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
json={
'type': 'CHAT_WITH_YOUTUBE_VIDEO',
'model': 'gpt-4o',
'conversationId': conversation_id,
'promptObject': {
'prompt': 'Can you summarize the main points discussed in this video?'
}
}
)
Example: Step 1 - Create Conversation
First, create a conversation with the YouTube video URL:
Loading interactive playground...
The response will include a uuid field. Use this as the conversationId in the next step.
Example: Step 2 - Chat with Video
Use the conversationId from the previous step to ask questions:
Loading interactive playground...
Response Format
{
"aiRecord": {
"uuid": "f1ad8d40-bb09-422e-802f-bd8bc5d265be",
"userId": "c937fbcc-fa8f-4565-a440-c4d87f56fcb2",
"teamId": "a4e176b2-dabb-451e-9c58-62b451fa9630",
"teamUser": {
"teamId": "a4e176b2-dabb-451e-9c58-62b451fa9630",
"userId": "c937fbcc-fa8f-4565-a440-c4d87f56fcb2",
"userName": "John Doe",
"userAvatar": "https://lh3.googleusercontent.com/a/ACg8ocLqgsNsHRfmWF9d-E1RvJetVsEzxNOsOg-NXWNTpMxLDPJbwELI=s96-c",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 15323374,
"createdAt": "2025-10-20T04:13:40.847Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-10-22T04:29:51.667Z",
"updatedBy": "SYSTEM"
},
"model": "gpt-4o",
"type": "CHAT_WITH_YOUTUBE_VIDEO",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": "7b954339-a493-45ba-9607-7e02003a3818",
"status": "SUCCESS",
"createdAt": "2025-10-22T04:34:49.929Z",
"aiRecordDetail": {
"promptObject": {},
"resultObject": [
"The transcript you provided is from the song "Never Gonna Give You Up" by Rick Astley. The main points or themes of the song revolve around a commitment to loyalty and unending support. The narrator promises never to give up or let down a significant other, emphasizing a sense of reliability and steadfastness in the relationship. The song conveys a message of enduring love and assurance."
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": ""
}
}
Use Cases
- Content Analysis: Analyze video content, themes, and key messages
- Educational Support: Get explanations of complex topics covered in educational videos
- Research: Extract specific information from lengthy video content
- Summarization: Generate concise summaries of video content
- Language Learning: Understand content in foreign language videos
- Accessibility: Get text-based descriptions of video content
Best Practices
- Clear Questions: Ask specific, well-formed questions for better responses
- Context Awareness: Reference specific parts or timestamps when needed
- Model Selection: Choose appropriate models based on complexity and response requirements
- Video Quality: Ensure the YouTube video is publicly accessible and has clear audio
- Rate Limiting: Be mindful of API rate limits for optimal performance
Error Handling
Common error scenarios:
- Invalid or private YouTube URLs
- Videos without accessible content or transcripts
- Network timeouts for very long videos
- Rate limit exceeded errors
For detailed error codes and troubleshooting, refer to the main API documentation.