Skip to main content
POST
/
v1
/
upload-url
Upload URL
curl --request POST \
  --url https://api.personal.ai/v1/upload-url \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "Url": "<string>",
  "Title": "<string>",
  "DomainName": "<string>",
  "StartTime": "<string>",
  "EndTime": "<string>",
  "Tags": "<string>",
  "is_stack": true
}
'
import requests

url = "https://api.personal.ai/v1/upload-url"

payload = {
"Url": "<string>",
"Title": "<string>",
"DomainName": "<string>",
"StartTime": "<string>",
"EndTime": "<string>",
"Tags": "<string>",
"is_stack": True
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
Url: '<string>',
Title: '<string>',
DomainName: '<string>',
StartTime: '<string>',
EndTime: '<string>',
Tags: '<string>',
is_stack: true
})
};

fetch('https://api.personal.ai/v1/upload-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.personal.ai/v1/upload-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Url' => '<string>',
'Title' => '<string>',
'DomainName' => '<string>',
'StartTime' => '<string>',
'EndTime' => '<string>',
'Tags' => '<string>',
'is_stack' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.personal.ai/v1/upload-url"

payload := strings.NewReader("{\n \"Url\": \"<string>\",\n \"Title\": \"<string>\",\n \"DomainName\": \"<string>\",\n \"StartTime\": \"<string>\",\n \"EndTime\": \"<string>\",\n \"Tags\": \"<string>\",\n \"is_stack\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.personal.ai/v1/upload-url")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.body("{\n \"Url\": \"<string>\",\n \"Title\": \"<string>\",\n \"DomainName\": \"<string>\",\n \"StartTime\": \"<string>\",\n \"EndTime\": \"<string>\",\n \"Tags\": \"<string>\",\n \"is_stack\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.personal.ai/v1/upload-url")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"Url\": \"<string>\",\n \"Title\": \"<string>\",\n \"DomainName\": \"<string>\",\n \"StartTime\": \"<string>\",\n \"EndTime\": \"<string>\",\n \"Tags\": \"<string>\",\n \"is_stack\": true\n}"

response = http.request(request)
puts response.read_body
{
  "message": "<string>"
}

Overview

API endpoint for uploading content from URLs to your memory. Supports various types of content including public Youtube URLs, LinkedIn profiles, news articles, and blogs.

Authorization

x-api-key
string
required
Your Personal AI API key

Headers

Content-Type
string
required
Must be set to application/json

Body

Url
string
required
URL to upload (includes public Youtube URLs, LinkedIn profiles, news articles, blogs, etc)
Example Request
"Url": "https://www.youtube.com/watch?v=-9F20HckH8w"
Title
string
Title of the uploaded content
Example Request
 "Title": "Personal AI Company Overview (2024)"
DomainName
string
required
The hyphenated text below the AI’s name when clicked into a Persona.DomainName
Example Request
"DomainName": "product-demo-jebzrhw"
StartTime
string
ISO timestamp string indicating start time (UTC)
Example Request
"StartTime": "2024-10-09T10:00:00.000Z"
EndTime
string
ISO timestamp string indicating end time (UTC)
Example Request
"EndTime": "2024-10-10T10:00:00.000Z"
Tags
string
Comma delimited list of tags for context and reference
Example Request
"Tags": "personal ai,youtube,company,overview"
is_stack
boolean
Boolean to specify whether to add the content to memory. Defaults to true.
Example Request
"is_stack": true
Example
{
    "Url": "https://www.youtube.com/watch?v=-9F20HckH8w",
    "Title": "Personal AI Company Overview (2024)",
    "DomainName": "product-demo-jebzrhw",
    "Tags": "personal ai,youtube,company,overview",
    "is_stack": true,
    "StartTime": "2024-10-09T10:00:00.000Z",
    "EndTime": "2024-10-10T10:00:00.000Z"
}

Example Responses

message
string
Success or error message
Example Success Response
{
    "message": "url accepted and processing"
}
Example Error Response
{
    "detail": "AI url upload unauthorized."
}

Example cURL

cURL
curl --location 'https://api.personal.ai/v1/upload-url' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
    "Url": "https://personal.ai",
    "Title": "Personal AI",
    "DomainName": "product-demo-jebzrhw",
    "is_stack": false
}'

Error Codes

CodeDescription
403Forbidden - Check that API key is invalid
400Invalid URL - URL cannot be accessed or is invalid
422Processing Error - Content cannot be extracted from URL