Skip to main content

Quick Start

Welcome to our API services! This guide helps you quickly get started with image and video generation.

Step 1: Get an API Key

  1. Visit the API Key Management page
  2. Sign in to your account
    Sign in to your APIMart account
  3. Create a new API key On the API Keys page, click the Create API Key button in the top-right corner.
    Click Create API Key on the API Keys page
    In the dialog that appears, enter a Name for the key, optionally configure the quota (Unlimited Quota), model limits (Enable Model Limits) and an IP whitelist, then click Create Key.
    Fill in the Create API Key form
  4. Save your key securely
    Click the copy icon to copy your API key

Step 2: Choose a Model

We provide multiple AI models to choose from. Visit the Model Market to browse all available models and their pricing.

Text Generation Models

  • GPT-4o: Powerful dialogue and text generation capabilities
  • Claude: High-performance conversational model by Anthropic
  • Gemini: Google’s multimodal large language model

Image Generation Models

  • GPT-4o-image: High‑quality image generation

Video Generation Models

  • Sora2: Professional video generation

Step 3: Send a Request

Text generation example

curl -X POST https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": "Hello, please introduce yourself"
      }
    ]
  }'

Image generation example

curl -X POST https://api.apimart.ai/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-image",
    "prompt": "A cute panda",
    "size": "1:1",
    "n": 1
  }'

Video generation example

curl -X POST https://api.apimart.ai/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sora-2",
    "prompt": "Waves crashing against the shore",
    "duration": 15,
    "aspect_ratio": "16:9"
  }'

Step 4: Check Task Status

Because we use asynchronous processing, you need to query task status to obtain results.
curl -X GET https://api.apimart.ai/v1/tasks/YOUR_TASK_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

What’s Next

View API docs

Learn more about all available API endpoints.

Development Guide

Learn how to integrate the API into your application.