Get a pull story
curl --request GET \
--url https://pullstory.com/api/v1/stories/{id}import requests
url = "https://pullstory.com/api/v1/stories/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pullstory.com/api/v1/stories/{id}', 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://pullstory.com/api/v1/stories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pullstory.com/api/v1/stories/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pullstory.com/api/v1/stories/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pullstory.com/api/v1/stories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "brief_0123abcd4567ef89",
"status": "generating",
"url": "https://pullstory.com/s/brief_0123abcd4567ef89",
"cached": false,
"message": "Another request is already generating this story",
"estimated_seconds": 90,
"duration_seconds": 142,
"scenes": 8,
"title": "How auth works in this codebase",
"error": "Story generation failed. Retry with a smaller brief."
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Stories
Get a pull story
Fetch a brief-generated pull story by ID. Poll this endpoint to check generation status.
GET
/
stories
/
{id}
Get a pull story
curl --request GET \
--url https://pullstory.com/api/v1/stories/{id}import requests
url = "https://pullstory.com/api/v1/stories/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://pullstory.com/api/v1/stories/{id}', 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://pullstory.com/api/v1/stories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pullstory.com/api/v1/stories/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pullstory.com/api/v1/stories/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pullstory.com/api/v1/stories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "brief_0123abcd4567ef89",
"status": "generating",
"url": "https://pullstory.com/s/brief_0123abcd4567ef89",
"cached": false,
"message": "Another request is already generating this story",
"estimated_seconds": 90,
"duration_seconds": 142,
"scenes": 8,
"title": "How auth works in this codebase",
"error": "Story generation failed. Retry with a smaller brief."
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Path Parameters
Pattern:
^brief_[a-f0-9]{16}$Example:
"brief_0123abcd4567ef89"
Response
Pull story details
Example:
"brief_0123abcd4567ef89"
Available options:
generating, ready, failed Example:
"https://pullstory.com/s/brief_0123abcd4567ef89"
Example:
false
Example:
"Another request is already generating this story"
Example:
90
Example:
142
Example:
8
Example:
"How auth works in this codebase"
Example:
"Story generation failed. Retry with a smaller brief."