CyberStock uses analytics to improve our service. You can learn more in ourPrivacy Policy.
    API v1.0

    CyberStock API

    Programmatic access to the CyberStock AI Engine for stock photo and video metadata. Titles, descriptions, keywords, and Selling Score in one API call, powered by real buyer searches.

    Base URL
    Copy your exact base URL from AccountAPI (inside the app). Use it as CYBERSTOCK_API_BASE.
    bash
    export CYBERSTOCK_API_BASE="https://<your-api-base>/functions/v1/api-gateway"

    Overview

    The CyberStock API lets you process images and videos and get stock-ready metadata: titles, descriptions, keywords, categories, and Selling Score. It uses the same AI Engine as the CyberStock web app.

    Photo & Video
    Process JPG, PNG, WebP, TIFF, MP4, MOV, and more
    Metadata Generation
    Generate titles, descriptions, and up to 50 keywords
    Scoring
    Get selling scores to evaluate commercial potential

    Authentication

    All API requests require an API key sent via the X-API-Key header.

    Getting Your API Key
    1. Sign in to CyberStock and go to your Account panel
    2. Click the API tab
    3. Click Generate Key. Your key starts with cs_live_
    4. Copy and save the key securely. It's shown only once
    Header
    X-API-Key: cs_live_YOUR_API_KEY_HERE
    Plan Requirement: API access requires a Pro, Studio, or Unlimited subscription, or a one-time 60,000 or 120,000 credit top-up purchase. Rate limits vary by plan: Pro & 60k top-up (60 req/min), Studio & 120k top-up (120 req/min), Unlimited (300 req/min).

    Endpoints

    POST/v1/processProcess an image or video
    GET/v1/accountGet account info and credits
    GET/v1/sessionsList your API sessions
    GET/v1/sessions/:idGet results for a specific session

    POST /v1/process

    Process a single image or video file and receive metadata generated by the CyberStock AI Engine. Provide the file either as a public URL or base64-encoded data.

    Request Parameters
    ParameterTypeDescription
    image_urlrequiredstringPublic URL of the image or video to process. Provide this or image_base64.
    image_base64stringBase64-encoded file data. Use when the file isn't publicly accessible. Limit: 250,000 base64 characters (for larger files, use image_url).
    filenamestringOriginal filename with extension (e.g., "beach.jpg"). Helps AI detect media type.
    languagestringOutput language code. Default: "en". Examples: "es", "de", "fr", "ja".
    keywords_limitnumberMaximum number of keywords to return. Default: 50. Range: 1-50.
    keyword_modestring"single" (default) for single-word keywords, or "long-tail" for multi-word phrases.
    platformstringTarget stock platform. Options: "shutterstock", "adobe", "alamy", "getty", etc.
    media_typestringOverride media type detection: "image", "video", or "vector".
    max_description_charsnumberMaximum characters for the description. Default: 480.
    max_title_charsnumberMaximum characters for the title. Default: 200.
    editorialbooleanEnable editorial mode for news/documentary content. Default: false.
    editorial_seedobjectEditorial context: {"city":"NYC","country":"US","date":"2024-01-15"}
    single_word_onlybooleanForce strictly single-word keywords (no compounds). Default: false.
    allow_compound_keywordsbooleanAllow multi-word compound keywords. Default: false.
    title_casebooleanOutput title in Title Case (capitalize each major word). Default: false (sentence case).
    title_all_capsbooleanOutput title in ALL CAPS. Default: false.
    Response
    JSON
    {
      "ok": true,
      "session_id": "sess_12345",
      "image_id": "img_12345",
      "status": "ready",
      "metadata": {
        "title": "Golden sunset over tropical beach with palm trees",
        "description": "Stunning golden hour sunset illuminating a pristine tropical beach lined with swaying palm trees, calm turquoise waters reflecting warm amber light, creating a serene and idyllic paradise scene perfect for travel and vacation concepts.",
        "keywords": [
          "sunset", "beach", "tropical", "palm trees", "ocean",
          "golden hour", "paradise", "vacation", "travel", "seascape",
          "turquoise", "calm", "serene", "idyllic", "coastline"
        ],
        "category": "Nature/Landscapes",
        "media_type": "image"
      },
      "scores": {
        "selling_score": 87,
        "title_score": 92,
        "description_score": 89,
        "keyword_score": 85
      },
      "credits": {
        "used": true,
        "remaining": 742
      },
      "processing": {
        "duration_ms": 1247,
        "retryable": false
      }
    }

    Code Examples

    Single File Processing
    bash
    export CYBERSTOCK_API_BASE="https://<your-api-base>/functions/v1/api-gateway"
    
    curl -X POST "$CYBERSTOCK_API_BASE/v1/process" \
      -H "X-API-Key: cs_live_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "image_url": "https://example.com/photo.jpg",
        "filename": "sunset-beach.jpg",
        "language": "en",
        "keywords_limit": 50,
        "keyword_mode": "single"
      }'
    Batch Processing (Python)
    python
    import requests
    import concurrent.futures
    
    API_KEY = "cs_live_YOUR_KEY"
    API_BASE = "https://<your-api-base>/functions/v1/api-gateway"
    API_URL = f"{API_BASE}/v1/process"
    
    files = [
        {"url": "https://example.com/photo1.jpg", "name": "photo1.jpg"},
        {"url": "https://example.com/photo2.jpg", "name": "photo2.jpg"},
        {"url": "https://example.com/video1.mp4", "name": "video1.mp4"},
    ]
    
    def process_file(file):
        resp = requests.post(API_URL, json={
            "image_url": file["url"],
            "filename": file["name"],
            "language": "en",
            "keywords_limit": 50,
        }, headers={"X-API-Key": API_KEY})
        return resp.json()
    
    # Process up to 5 files concurrently
    with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
        results = list(executor.map(process_file, files))
    
    for r in results:
        if r.get("ok"):
            print(f"{r['metadata']['title']}")

    GET /v1/account

    Check your current plan, credit balance, and account status.

    bash
    curl "$CYBERSTOCK_API_BASE/v1/account" \
      -H "X-API-Key: cs_live_YOUR_KEY"
    JSON
    {
      "ok": true,
      "account": {
        "email": "user@example.com",
        "plan": "pro",
        "api_access": true,
        "api_tier": "pro",
        "credits": 742,
        "credits_subscription": 500,
        "credits_topup": 242,
        "is_unlimited": false
      }
    }

    GET /v1/sessions

    List your recent API processing sessions.

    bash
    curl "$CYBERSTOCK_API_BASE/v1/sessions" \
      -H "X-API-Key: cs_live_YOUR_KEY"

    GET /v1/sessions/:id

    Get all processed results for a specific session, including full metadata for each file.

    bash
    curl "$CYBERSTOCK_API_BASE/v1/sessions/<SESSION_ID>" \
      -H "X-API-Key: cs_live_YOUR_KEY"

    Rate Limits

    Rate limits depend on your subscription plan:

    PlanRequests / MinuteMax API Keys
    Pro / 60k Top-Up603
    Studio / 120k Top-Up1203
    Unlimited3003

    When you exceed the limit, the API returns 429 RATE_LIMIT_EXCEEDED. Wait a few seconds and retry.

    Error Reference

    StatusError CodeDescription
    401UNAUTHORIZEDMissing or invalid API key
    401INVALID_API_KEYAPI key is revoked or doesn't exist
    402INSUFFICIENT_CREDITSNot enough credits to process
    403API_ACCESS_DENIEDPlan doesn't include API access (need Pro+)
    403SCOPE_DENIEDAPI key doesn't have required scope
    429RATE_LIMIT_EXCEEDEDToo many requests per minute
    400MISSING_INPUTNo image_url or image_base64 provided
    400INVALID_JSONRequest body is not valid JSON
    502PROCESSING_FAILEDInternal processing error (retry)

    Ready to get started?

    Generate your API key and start processing files in minutes.