Introduction
Everything you need to integrate PatFishStudio into your product stack.
Overview
PatFishStudio provides a unified API for text generation, image creation, and workflow automation. Authenticate with a single API key and start making requests in under a minute.
Before you begin
You'll need a PatFishStudio account and an API key. Sign up at patfishstudio.com/signup to get started for free.
Quick Start
Install the SDK and make your first completion request in three steps.
Terminal
npm install @patfishstudio/sdkapp.ts
import { PatFishStudio } from "@patfishstudio/sdk";
const studio = new PatFishStudio({
apiKey: process.env.PATFISHSTUDIO_API_KEY,
});
const response = await studio.completions.create({
model: "patfish-3",
prompt: "Summarize our Q4 revenue report",
maxTokens: 256,
});
console.log(response.text);That's it!
You've just made your first AI completion. Explore the full API reference to unlock image generation, webhooks, and more.
Installation
The SDK supports Node.js 18+ and all modern edge runtimes. Choose your preferred package manager:
npm
npm install @patfishstudio/sdkpnpm
pnpm add @patfishstudio/sdkyarn
yarn add @patfishstudio/sdkEnvironment variables
Never commit your API key to version control. Use
.env.local or your platform's secret management to store it securely.Authentication
All requests require a Bearer token in the Authorization header. The SDK handles this automatically when you pass your API key.
cURL
curl https://api.patfishstudio.com/v1/completions \
-H "Authorization: Bearer pf_sk_..." \
-H "Content-Type: application/json" \
-d '{"model": "patfish-3", "prompt": "Hello"}'Rate Limits
Rate limits are applied per API key and vary by plan:
| Plan | Requests / min | Tokens / day |
|---|---|---|
| Free | 20 | 10,000 |
| Pro | 200 | 500,000 |
| Enterprise | Unlimited | Unlimited |