Docs
    Docs
    • Introduction
    • Quick Start Guide
    • Make a request
    • YEScale System API Tutorial
    • Chat Models
      • ChatGpt
        • ChatGPT (Audio)
          • Create transcription by gpt-4o-mini-transcribe & gpt-4o-transcribe
          • Create a voice with gpt-4o-mini-tts
          • Create a voice
          • Create a transcript
          • Create translation
        • ChatGPT (Chat)
          • Chat completion object
          • Create chat completion (streaming)
          • Create chat completion (non-streaming)
          • Create chat image recognition (streaming)
          • Create chat image recognition (streaming) base64
          • Create chat image recognition (non-streaming)
          • Function calling
          • N choices
          • Create chat function call (only non-streaming)
          • Create structured output
        • ChatGPT (Completions)
          • Completion object
          • Creation completed
        • ChatGPT(Embeddings)
          • Embedded Object
          • Create embed
      • Anthropic Claude
        • Offical Format
          • Messages (official Anthropic format)
          • Messages(Image Recognition)
          • Messages(function call)
          • Messages(Web search)
        • Create chat completion (streaming)
        • Create chat completion (non-streaming)
        • Create chat image recognition (streaming)
        • Create chat image recognition (non-streaming)
      • Gemini
        • Gemini Image creation interface (gemini-2.0-flash-exp-image-generation)
        • Chat interface
        • Image recognition interface
        • Function calling - Google Search
        • Function calling - codeExecution
      • Deepseek
        • Deepseek v3.1
    • Image Models
      • GPT-IMAGE-1
        • Generate Image by gpt-image-1
        • Edit Image by gpt-image-1
      • QWEN IMAGE
        • Generate Image by qwen-image
        • Edit Image by qwen-image-edit
      • MJ
        • Submit Imagine task (mj_imagine)
        • Submit Blend task (mj_blend)
        • Submit Describe task (mj_describe)
        • Submit Change task (mj_variation, mj_upscale,mj_reroll)
        • Query task status based on task ID
      • Ideogram
        • Generate with Ideogram 3.0
        • Edit with Ideogram 3.0
        • Remix with Ideogram 3.0
        • Ideogram Upscale
      • Kling Image
        • Submit Image Generation
        • Get Image by Task ID
        • Submit Kolors Virtual Try On
        • Get Kolors Virtual Try On by Task ID
      • Flux
        • Flux on Replicate
          • Submit Image by flux-kontext-pro
          • Submit Image by flux-kontext-max
          • Submit Image by flux-pro
          • Submit Image by flux-pro-1.1-ultra
          • Get Image by ID
      • Recraft API
        • Recraft Image
        • Generate Image
        • Generate Vector Image
        • Remove Background
        • Clarity Upscale
        • Generative Upscale
      • Models use Dall-e Format
        • Google Imagen
        • Bytedance - seedream-3.0
        • Recraftv3 use Dall-e endpoint
        • Flux use Dall-e endpoint
      • Google Imagen
        • Google/imagen-4 on Replicate
        • Get Imagen 4 Task
      • Gemini-2.5-flash-image
        • Create Text to Image
        • Edit Image - Base64 Image -> Image
      • DALL·E 3
        POST
    • Video Models
      • Kling Video
        • Create Video by Text
        • Get Video by Task ID(text2video)
        • Create Video by Image
        • Get Video by Task ID(image2video)
      • Runway ML Video
        • Create Video by Runway
        • Get Video by Task ID
      • Luma Video
        • Create Video by Luma
        • Get Video by Task ID
      • Pika Video
        • Create Video by Pika
        • Get Video by Task ID
      • Google Veo
        • Submit Video Request
        • Submit Video Request with Frames
        • Get Video by ID
      • Minimax - Hailuo
        • Submit Video Request
        • Get Video
      • Seedance
        • Submit Video Request
        • Get Video by Task ID
      • Mj Video
        • Submit Mj Video Request
        • Get Mj Video by task id
    • FAL-AI Models
      • Images Models
        • Ideogram/v3/remix
        • Flux-pro/kontext/max
        • Fal-recraft-v3-text-to-image
        • Fal-recraft-v3-image-to-image
        • Fal-bytedance-seededit-v3-edit-image
      • Audio Models
        • Minimax/speech-02-hd
        • Minimax/speech-02-turbo
        • Elevenlabs/tts/turbo-v2.5
        • Elevenlabs/tts/multilingual-v2
      • Video Models
        • Topaz/upscale/video
        • Luma-dream-machine/ray-2-flash/reframe
        • Luma-dream-machine/ray-2/reframe
      • Get FAL-AI tasks
    • Music Model - Suno
      • Illustrate
      • Parameter
      • Task submission
        • Generate songs (inspiration, customization, continuation)
        • Generate lyrics
      • Query interface
        • Query a single task
    • Python Samples
      • python openai official library (using AutoGPT, langchain, etc.)
      • Python uses speech to text
      • Python uses text to speech
      • Python uses Embeddings
      • python calls DALL·E
      • python simple call openai function-calling demo
      • python langchain
      • python llama_index
      • Python uses gpt-4o to identify pictures-local pictures
      • python library streaming output
      • Python uses gpt-4o to identify images
    • Plug-in/software usage tutorials
      • Setting HTTP for Make.com with Yescale
      • Sample Code for gpt-4o-audio/gpt-4o-mini-audio
    • Help Center
      • HTTP status codes
    • Tutorials
      • GPT-Image-1 API: A Step-by-Step Guide With Examples
      • Claude Code via YEScale API
      • Task Sync Endpoint Usage Guide

    YEScale System API Tutorial

    This tutorial will guide you through the process of integrating with the YEScale System API. You will learn how to retrieve user information, manage your API keys, track your tasks, and access system logs.
    Base URL: https://yescale.bogia.app

    Table of Contents#

    1.
    Prerequisites
    2.
    Authentication
    3.
    API Endpoints
    3.1 Get User Information
    3.2 API Key Management
    3.2.1 List API Keys
    3.2.2 Delete API Key
    3.2.3 Adjust Quota
    3.3 List Tasks
    3.4 Get Logs
    3.5 List Models

    1. Prerequisites#

    Before you begin, ensure you have the following:
    Access Key: Obtain your unique Access Key from your YEScale account's home page. This key is essential for authenticating your API requests.

    2. Authentication#

    All requests to the YEScale System API require authentication. You must include your Access Key in the Authorization header for most endpoints.
    Header Format:
    Authorization: Bearer ACCESS_KEY
    Replace ACCESS_KEY with your actual Access Key.

    3. API Endpoints#

    The following sections detail the available API endpoints and how to use them.

    3.1 Get User Information#

    Retrieve detailed information about your YEScale user account.
    Endpoint: /yescale/user
    Method: GET
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Example Request:
    Example Response:
    {
        "data": {
            "access_token": "XXXXX",
            "display_name": "Your Display Name",
            "email": "your.email@example.com",
            "quota": 8664402091,
            "request_count": 213527,
            "role": 1,
            "telegram_id": "",
            "used_quota": 1460014143,
            "username": "your_username"
        },
        "message": "",
        "success": true
    }
    Response Field Descriptions:
    quota: Your remaining credits. To convert to USD, divide by 500,000.
    used_quota: Your consumed credits. To convert to USD, divide by 500,000.
    Other fields provide user profile and account details.

    3.2 API Key Management#

    Endpoints for listing, deleting, and managing the quota of your API keys.

    3.2.1 List API Keys#

    Fetch a list of all API keys associated with your YEScale account.
    Endpoint: /yescale/apikeylist
    Method: GET
    Query Parameters:
    keyword (optional): A string to filter API keys by name.
    token (optional): Your user token.
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Example Request:
    Example Response:
    {
        "data": [
            {
                "DeletedAt": null,
                "accessed_time": 1752898519,
                "allow_ips": "",
                "created_time": 1750262525,
                "expired_time": -1,
                "group": "normal",
                "id": 7136,
                "key": "XXXXX",
                "model_limits": "",
                "model_limits_enabled": false,
                "name": "dsdfs",
                "remain_quota": 113777,
                "status": 1,
                "unlimited_quota": true,
                "used_quota": 386223,
                "user_id": 2
            }
        ]
    }
    Response Field Descriptions:
    id: The unique identifier for the API key.
    key: The API key string (partially masked).
    name: A user-defined name for the key.
    status: The status of the key (e.g., 1 for active).
    remain_quota: The remaining quota assigned to this key.
    unlimited_quota: A boolean indicating if the key has unlimited quota.
    used_quota: The total quota consumed by this key.
    expired_time: The Unix timestamp for when the key expires (-1 for no expiration).

    3.2.2 Delete API Key#

    Deletes a specific API key.
    Endpoint: /yescale/deletekey/{key_id}
    Method: DELETE
    URL Parameters:
    key_id (required): The unique ID of the API key to delete.
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Example Request:
    Example Success Response:
    {
        "message": "",
        "success": true
    }

    3.2.3 Adjust Quota#

    Sets or changes the credit quota for a specific API key.
    Endpoint: /yescale/editquota/{key_id}
    Method: PUT
    URL Parameters:
    key_id (required): The unique ID of the API key to modify.
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Content-Type: application/json
    Request Body:
    The payload should be a JSON object containing the new quota.
    {
        "remain_quota": 50000000
    }
    Note on Quota: The remain_quota value is converted to USD credits by dividing it by 500,000. For example, a remain_quota of 50,000,000 is equivalent to $100.
    Example Request:

    3.3 List Tasks#

    Retrieve a list of tasks executed by your account, with options to filter by time.
    Endpoint: /yescale/task
    Method: GET
    Query Parameters:
    start_timestamp (required): The Unix timestamp marking the beginning of the time range.
    end_timestamp (required): The Unix timestamp marking the end of the time range.
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Example Request:

    3.4 Get Logs#

    Access system logs related to your API usage. You can filter logs by various parameters, including time ranges.
    Endpoint: /yescale/logs
    Method: GET
    Query Parameters:
    p (optional): Page number for pagination. Defaults to 1.
    page_size (optional): Number of items per page. Defaults to 10000.
    type (optional): Type of logs to retrieve (e.g., 2).
    token_name (optional): Filter logs by a specific token name.
    model_name (optional): Filter logs by a specific model name.
    username (optional): Filter logs by username.
    start_timestamp (optional): The Unix timestamp marking the beginning of the time range for logs.
    end_timestamp (optional): The Unix timestamp marking the end of the time range for logs.
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY)
    Example Request:

    3.5 List Models#

    Retrieve a list of all available models in the system.
    Endpoint: /yescale/models
    Method: GET
    Headers:
    Authorization: Bearer ACCESS_KEY (Replace ACCESS_KEY with your actual key)
    Example Request:
    Example Response:
    {
        "data": [
            {
                "alternative_info": null,
                "avg_time_high": 10.6153846153846,
                "avg_time_low": 5.83333333333333,
                "avg_time_normal": 6.76923076923077,
                "billing_type": "pay-per-request",
                "category": "Image, Dall-e",
                "created_at": "2025-06-27T09:08:29.908425+00:00",
                "docs": "https://im06lq19wz.apifox.cn/api-311905851",
                "endpoint": "/v1/images/generations",
                "group_name": "drawing",
                "group_ratio": 1.25,
                "id": 143,
                "input_price": null,
                "is_deprecation": 0,
                "is_hot": 0,
                "is_image": 0,
                "is_web_access": 0,
                "knowledge_cutoff": null,
                "max_input": null,
                "max_output": null,
                "model_name": "imagen4-fast",
                "notes": "",
                "output_price": null,
                "price_per_request": "0.04 ~ 400 VND",
                "provider_logo": "data:image/svg+xml;base64,...",
                "provider_name": "Google",
                "quality_api": 41.3,
                "release_date": null,
                "saving": 23.08,
                "saving_details": "- **Offical Price**: $0.02x26.000(VNDUSD Ex) = 520VND  \n- **YEScale Price**: $0.04x1.25(GroupRatio)x8.000(TopUp Price)= 400VND  \n- **Saving Ratio**: 23.08%",
                "throughput": null,
                "updated_at": null,
                "uptime": 1
            }
        ]
    }
    Response Body Fields
    Here is an explanation of the key fields in the response object.
    model_name: The unique identifier for the model (e.g., imagen4-fast).
    uptime: Indicates the operational status of the model's API.
    1: The API is operating normally.
    0: The API is currently under maintenance.
    is_deprecation: Shows the deprecation status of the model.
    0: The model is active and fully supported.
    1: The model is deprecated and will be removed in a future update. Users should plan to migrate to an alternative.
    2: The model is no longer active and cannot be used.
    endpoint: The specific API path to use for making requests to this model (e.g., /v1/images/generations).
    billing_type: The method used for billing (e.g., pay-per-request).
    price_per_request: The estimated cost for a single API call to this model.
    provider_name: The original provider of the AI model (e.g., "Google", "OpenAI").
    category: The categories the model belongs to, such as "Image" or "Text Generation".
    docs: A link to the official documentation for the model.
    saving_details: A breakdown of the cost savings when using YEScale compared to the official provider's price.

    Modified at 2025-07-31 09:56:50
    Previous
    Make a request
    Next
    Create transcription by gpt-4o-mini-transcribe & gpt-4o-transcribe
    Built with