Docs/Quick Start

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_xxxxxxxxxxxxx
2

Install the SDK (optional)

While you can use the REST API directly, our SDKs make integration easier.

npm

npm install @abstrakt/sdk

pip

pip install abstrakt
3

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

FieldTypeDescription
request_idstringUnique identifier for the request
statusstringJob status: pending, processing, completed, failed
outputobjectGenerated content (images, video, audio, etc.)
metricsobjectPerformance metrics like inference time

Next Steps