Quick Start
Get up and running with Abstrakt in under 5 minutes.
1
Get your API key
Sign up for an account and create an API key from your Dashboard. Keep this key secure — it provides access to your account.
ABSTRAKT_API_KEY=sk_live_xxxxxxxxxxxxx2
Install the SDK (optional)
While you can use the REST API directly, our SDKs make integration easier.
npm
npm install @abstrakt/sdkpip
pip install abstrakt3
Make your first request
Generate an image using FLUX Schnell, one of the fastest image models available.
import { Abstrakt } from '@abstrakt/sdk';
const abstrakt = new Abstrakt({
apiKey: process.env.ABSTRAKT_API_KEY
});
const result = await abstrakt.run('fal-ai/flux/schnell', {
prompt: 'A serene mountain landscape at sunset',
image_size: 'square_hd'
});
console.log(result.output.items[0].url);4
Handle the response
The API returns a JSON response with your generated content:
{
"request_id": "req_abc123",
"status": "completed",
"output": {
"items": [
{
"type": "image",
"url": "https://cdn.abstrakt.one/outputs/abc123.png",
"width": 1024,
"height": 1024
}
]
},
"metrics": {
"inference_time": 1.8
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| request_id | string | Unique identifier for the request |
| status | string | Job status: pending, processing, completed, failed |
| output | object | Generated content (images, video, audio, etc.) |
| metrics | object | Performance metrics like inference time |