Skip to content

Quickstart Guide

Get up and running with FOTOhub in under 5 minutes.

1. Create an Account

Sign up at fotohub.app and top up your API prepaid wallet in Console → Wallet.

2. Generate an API Key

Go to Console → Keys and create a new key:

  1. Click Create Key
  2. Name it (e.g., "My First Key")
  3. Copy the key — it's shown only once

Your key looks like: fh_live_sk2Kj8mN4pQ7rT1vX3yZ5bD9fH2gL6wA0cE4

3. Make Your First Call

bash
export FOTOHUB_API_KEY="fh_live_your_key_here"

curl -X POST https://apis.fotohub.app/v1/ai/generate/image \
  -H "Authorization: Bearer $FOTOHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedream-5-0-260128",
    "prompt": "A cute robot reading a book in a cozy library, digital art",
    "aspect_ratio": "1:1"
  }'

4. Install the SDK

bash
pip install fotohub
bash
npm install fotohub

5. Use the SDK

python
from fotohub import FotoHub

client = FotoHub()  # reads FOTOHUB_API_KEY env var

# Generate an image
result = client.generate_image(
    prompt="A cute robot reading a book in a cozy library, digital art",
    model="seedream-5-0-260128"
)
print(f"Image: {result.images[0]}")
print(f"Cost: ${result.billing.cost_usd}")

# Check balance
balance = client.get_balance()
print(f"Wallet balance: ${balance.wallet.balance_usd}")

6. Set Up Webhooks (Optional)

Get notified when generations complete:

  1. Go to Console → Webhooks
  2. Create a webhook with your server URL
  3. Select events: generation.completed
  4. Save the secret for signature verification

What's Next?