Seedance 2.5 from ByteDance is officially available on Apiframe.

Getting Started with Apiframe

A complete beginner's guide to setting up your Apiframe account and making your first API call with the v2 API.

Renaud Last updated August 7, 2026 December 14, 2025 · 4 min read Beginner
Getting Started with Apiframe

Apiframe gives you one REST API to generate images, videos, and music using top models like Midjourney, Flux, Kling, Sora, and Suno. This guide walks you through setup and your first generated image in under a minute.

Prerequisites

  • A basic understanding of REST APIs
  • An HTTP client (curl, Postman, or your preferred language)
  • An Apiframe account (sign up at console.apiframe.ai)

Step 1: Create your account

Visit console.apiframe.ai, enter your email and click Send Magic Link, or sign in with GitHub. You'll receive 100 free credits to start experimenting right away — phone verification is required to prevent abuse, and if you can't verify by phone you can buy the same 100 credits for $1.

Step 2: Get your API key

Once logged in, navigate to API Keys in the dashboard. Create a new key and copy it somewhere safe. Apiframe v2 API keys start with afk_.

⚠️
Never expose your API key in client-side code or public repositories.

Step 3: Make your first request

Send a POST request to POST /v2/images/generate. Pass your API key in the X-API-Key header and specify the model and prompt in the request body.

javascriptgenerate-image.js
const response = await fetch('https://api.apiframe.ai/v2/images/generate', {
  method: 'POST',
  headers: {
    'X-API-Key': 'afk_your_api_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'a futuristic city skyline at sunset, cyberpunk style',
    model: 'midjourney',
  }),
});

const data = await response.json();
console.log(data); // { jobId: 'abc-123', status: 'QUEUED' }
pythongenerate-image.py
import requests

response = requests.post(
    'https://api.apiframe.ai/v2/images/generate',
    headers={
        'X-API-Key': 'afk_your_api_key_here',
        'Content-Type': 'application/json',
    },
    json={
        'prompt': 'a futuristic city skyline at sunset, cyberpunk style',
        'model': 'midjourney',
    },
)
data = response.json()
print(data)  # {'jobId': 'abc-123', 'status': 'QUEUED'}

Step 4: Poll for the result

The request returns immediately with a jobId. Use that ID to check the job status until it reaches COMPLETED.

javascriptpoll-job.js
const status = await fetch(
  'https://api.apiframe.ai/v2/jobs/abc-123',
  { headers: { 'X-API-Key': 'afk_your_api_key_here' } }
);

const job = await status.json();
// job.status: 'QUEUED' | 'PROCESSING' | 'COMPLETED' | 'FAILED'
// job.result.images: array of CDN URLs when COMPLETED
console.log(job.result.images);

Jobs progress through these states:

QUEUEDJob is waiting to be processed
PROCESSINGJob is actively running — check progress for percentage
COMPLETEDResult is ready — images, videoUrl, or tracks in the result field
FAILEDSomething went wrong — check the error field
For production workloads, use webhooks instead of polling. Add a webhookUrl and webhookEvents: ["completed", "failed"] to your request body and Apiframe will POST the result to your server. See the Webhooks guide in the docs for details.

What you can generate

The same job-based pattern works across all three generation types. See our guides for AI image generation, AI video generation, and AI music generation for model comparisons and details. Just hit a different endpoint for each:

ImagesPOST /v2/images/generatemidjourney, flux-2-pro, imagen-4, ideogram-v4-quality
VideosPOST /v2/videos/generatekling-3.0, sora-2, veo-3.1, hailuo-03
MusicPOST /v2/music/generatesuno, udio, lyria-3-pro

Next steps

  • Browse the full model list at apiframe.ai/docs
  • Explore image editing endpoints (background removal, inpainting, and upscaling)
  • Set up webhooks for production workflows
  • Join the Discord community at discord.gg/pM3qyNAXXC

Power your next AI product with Apiframe.

Instant access to 70+ media models through a single API. Start free and scale when you're ready.