Projets
Générer un projet
Générez un deck interactif et explorable à partir d’une invite textuelle.
POST
/
projects
/
generate
Generate a project
curl --request POST \
--url https://faces.app/api/v1/projects/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "5-slide pitch deck about AI in healthcare with a modern dark theme",
"templateId": "<string>"
}
'import requests
url = "https://faces.app/api/v1/projects/generate"
payload = {
"prompt": "5-slide pitch deck about AI in healthcare with a modern dark theme",
"templateId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '5-slide pitch deck about AI in healthcare with a modern dark theme',
templateId: '<string>'
})
};
fetch('https://faces.app/api/v1/projects/generate', 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://faces.app/api/v1/projects/generate",
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([
'prompt' => '5-slide pitch deck about AI in healthcare with a modern dark theme',
'templateId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://faces.app/api/v1/projects/generate"
payload := strings.NewReader("{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://faces.app/api/v1/projects/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://faces.app/api/v1/projects/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "processing",
"editorUrl": "<string>",
"estimatedDuration": "240 seconds",
"templateId": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}Autorisations
API key with "faces_" prefix. Create one at Settings > Developers.
Corps
application/json
A detailed description of the project to generate.
Minimum string length:
1Exemple:
"5-slide pitch deck about AI in healthcare with a modern dark theme"
ID of one of your team's templates to base the project on. The template's design is preserved exactly and its slides are reproduced with your content. Only team templates are supported.
Réponse
Job created
Poll this ID with the status endpoint.
Options disponibles:
processing URL to open the project in the Faces editor.
Estimated generation time. ~120s with a team template, 240s from scratch.
Exemple:
"240 seconds"
⌘I
Generate a project
curl --request POST \
--url https://faces.app/api/v1/projects/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "5-slide pitch deck about AI in healthcare with a modern dark theme",
"templateId": "<string>"
}
'import requests
url = "https://faces.app/api/v1/projects/generate"
payload = {
"prompt": "5-slide pitch deck about AI in healthcare with a modern dark theme",
"templateId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: '5-slide pitch deck about AI in healthcare with a modern dark theme',
templateId: '<string>'
})
};
fetch('https://faces.app/api/v1/projects/generate', 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://faces.app/api/v1/projects/generate",
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([
'prompt' => '5-slide pitch deck about AI in healthcare with a modern dark theme',
'templateId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://faces.app/api/v1/projects/generate"
payload := strings.NewReader("{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://faces.app/api/v1/projects/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://faces.app/api/v1/projects/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"5-slide pitch deck about AI in healthcare with a modern dark theme\",\n \"templateId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"jobId": "<string>",
"status": "processing",
"editorUrl": "<string>",
"estimatedDuration": "240 seconds",
"templateId": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}{
"error": "<string>",
"hint": "<string>"
}