Passer au contenu principal
GET
/
characters
/
{slug}
/api/v1/characters/{slug}
curl --request GET \
  --url https://api.venice.ai/api/v1/characters/{slug} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.venice.ai/api/v1/characters/{slug}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.venice.ai/api/v1/characters/{slug}', 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.venice.ai/api/v1/characters/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://api.venice.ai/api/v1/characters/{slug}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.venice.ai/api/v1/characters/{slug}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.venice.ai/api/v1/characters/{slug}")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "data": {
    "adult": false,
    "author": "k3x9q",
    "createdAt": "2024-12-20T21:28:08.934Z",
    "description": "Alan Watts (6 January 1915 – 16 November 1973) was a British and American writer, speaker, and self-styled \"philosophical entertainer\", known for interpreting and popularizing Buddhist, Taoist, and Hindu philosophy for a Western audience.",
    "featured": false,
    "id": "2f460055-7595-4640-9cb6-c442c4c869b0",
    "name": "Alan Watts",
    "shareUrl": "https://venice.ai/c/alan-watts",
    "photoUrl": "https://outerface.venice.ai/api/characters/2f460055-7595-4640-9cb6-c442c4c869b0/photo",
    "slug": "alan-watts",
    "stats": {
      "averageRating": 4.7,
      "imports": 112,
      "ratingCount": 24,
      "ratingSum": 113,
      "userRating": 123
    },
    "tags": [
      "AlanWatts",
      "Philosophy",
      "Buddhism",
      "Taoist",
      "Hindu"
    ],
    "updatedAt": "2025-02-09T03:23:53.708Z",
    "webEnabled": true,
    "modelId": "venice-uncensored-1-2"
  },
  "object": "character"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Endpoint expérimental

Il s’agit d’un endpoint expérimental qui peut être sujet à modification.

Collection Postman

Pour des exemples supplémentaires, veuillez consulter cette collection Postman.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

slug
string
requis

The slug of the character to retrieve

Exemple:

"alan-watts"

Réponse

OK

data
object
requis
object
enum<string>
requis
Options disponibles:
character