Quickstart

Geppetto is a low cost inference provider offering subscription pricing instead of usage based pricing.

We are committed to offering you the best service we can provide for the cost.

Currently we offer API endpoints for:

Please note Geppetto is currently in alpha!

Making a Request

Before making a request you must register for an account (opens in a new tab) and create an API key. Once you have an API key you can make requests to the API.

Best practice is to store your API Key in an environment variable GEPPETTO_API_KEY.

You can do this like so (on OSX/Linux):

export GEPPETTO_API_KEY="your-api-key"

Terminal (via CURL)

curl -X POST \
  "https://api.geppetto.app/speak" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${GEPPETTO_API_KEY}" \
  -d '{
    "text": "I'\''m a real boy!"
  }'\
  --output speech.mp3

Python

import os
import requests
 
# load env var
GEPPETTO_API_KEY = os.environ.get("GEPPETTO_API_KEY")
 
# set up the request headers and data
url = 'https://api.geppetto.app/speak'
headers = {
  "Content-Type": "application/json",
  "Authorization": f"Bearer {GEPPETTO_API_KEY}",
}
data = {
  'text': "I'm a real boy!"
}
 
# send the request
response = requests.post(url, headers=headers, json=data, stream=True)
 
# if the request is valid write it to speech.mp3
if response.status_code == 200:
  with open("speech.mp3", "wb") as file:
    for chunk in response.iter_content(chunk_size=1024):
      file.write(chunk)
else:
  print(f"{response.status_code}: {response.text}")

Node.js

  1. Install the Geppetto Typescript Library
npm install @geppetto-app/geppetto
  1. Use the library to make a 'speak' request and save it to a file
import fs from "fs";
import {
  Geppetto
} from '@geppetto-app/geppetto';
 
// the library will load the env var GEPPETTO_API_KEY automatically
const geppetto = new Geppetto();
 
// you can also pass it directly in like so
// const geppetto = new Geppetto({apiKey: "your-api-key"});
 
async function main() {
  const response = await geppetto.speak({
      "text": "I'm a real boy!"
    })
    .catch((err) => {
      throw err;
    });
 
  fs.writeFileSync('output.mp3', response);
}
 
main();