OhMyGPT API
English
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
English
  • 中文
  • English
  • 日本語
  1. Storage service
  • Introduction to this site
  • Change log
  • OpenAI
    • Responses
      • Create model response
      • Get model response
      • Delete model response
      • Cancel response
      • List input items
    • Conversations
      • create conversation
      • Retrieve conversation
      • update conversation
      • delete conversation
      • Create items
      • list items
      • Retrieve item
      • Delete item
    • create completion
      POST
    • TTS text to speech
      POST
    • Embeddings
      POST
    • image generation
      POST
    • image editing
      POST
  • Store
    • List chat completions
      POST
    • Get chat completed
      POST
    • Deletion of chat completed
      POST
  • Claude
    • Anthropic native Completions enterprise commercial API
      POST
    • Anthropic native Messages API
      POST
    • Anthropic native Messages Token Count API
      POST
  • OAuth开放API
    • Introduction to Open OAuth API
    • User authorization page
      GET
    • Code display page
      GET
    • Apply for access_token
      POST
    • Read basic user information
      POST
    • Read user balance information
      POST
    • Charge user fees
      POST
    • Create a Stripe Checkout recharge order for the user
      POST
    • Create a Stripe Invoice recharge order for the user
      POST
    • Call other open APIs
      POST
    • Read user management token through OAuth Token
      POST
    • Update user management token through OAuth Token
      POST
  • other
    • search
      • Google Custom Search API
      • Google Search By Serper
    • Azure
      • Azure text-to-speech
      • Azure gets TTS voice list
  • Override rules
    • Create rules
    • Update rules
    • delete rule
    • Get rules
    • list rules
    • Batch enable/disable
    • Copy rules
    • test rules
    • Get statistics
    • Get restriction configuration
    • Check rule name
    • Batch delete
    • Export rules
    • Import rules
  • image generation
    • other
      • ND image generation API
    • Flux
      • Flux Schnell image generation
      • Flux Dev image generation
      • Flux Pro image generation
      • Flux Pro 1.1 image generation
      • Flux 1.1 Pro Ultura image generation
  • Storage service
    • File storage service
    • File upload
      POST
    • File information update
      POST
    • Delete files
      POST
    • User query (pagination)
      POST
    • User metadata query (by fileUinqueIds)
      POST
    • File download interface (Public file download)
      GET
    • File download interface (Private private file download)
      GET
    • Obtain public file metadata
      GET
  • API KEY management
    • Create new API Key
    • Modify API Key information
    • Query all API Keys of the user
    • Delete the specified API Key
    • Interface for querying user membership expiration date
    • User balance query interface
    • Query the current model magnification interface
  • Archive documents
    • Self-service invoicing system usage documentation
    • Telegram Bot usage documentation
    • Self-built Cloudflare Worker anti-generation tutorial
    • Claude Code forwarding service
    • CodeX forwarding service
    • Introduction to the new website
  • Model list
    GET
  1. Storage service

User metadata query (by fileUinqueIds)

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
POST
/api/v1/user/files/get-metadata

Introduction#

Query the metadata of uploaded files based on fileId

Parameter description#

Field nameTypeRequiredSample valueComments
fileUniqueIdsstringtrue["ENthMCy_5zr5zN3GRJseM"]Query Id
Calling this interface requires providing valid APIKey credentials. If APIKey permission check is enabled, you need to have file-v1 permissions.

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/x-www-form-urlencoded

返回响应

🟢200success
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cn2us02.opapi.win/api/v1/user/files/get-metadata' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'fileUniqueIds=X7DWcPTJ4mhxwepEJ1z34' \
--data-urlencode 'fileUniqueIds=RZEruBJFEvoOz8NYKusfD'
响应示例响应示例
Successful Examples
{
    "statusCode": 200,
    "message": "Get File Metadata Success",
    "data": [
        {
            "user_id": "1",
            "file_name": "ohmygpt-logo-black.svg",
            "purpose": 0,
            "uploaded_at": "2025-02-08T12:31:46.189Z",
            "update_at": "2025-02-08T12:31:46.189Z",
            "expires_at": null,
            "file_size": "2430",
            "mime_type": "image/svg+xml",
            "tags": null,
            "file_unique_id": "RZEruBJFEvoOz8NYKusfD",
            "status": 2,
            "is_public": true,
            "share_enabled": false,
            "share_path": null,
            "share_expires_at": null,
            "access_secret_enabled": false,
            "access_secret": null,
            "share_view_count": 0,
            "share_dl_count": 0
        },
        {
            "user_id": "1",
            "file_name": "ohmygpt-logo-black.png",
            "purpose": 0,
            "uploaded_at": "2025-02-09T11:40:50.086Z",
            "update_at": "2025-02-09T11:40:50.086Z",
            "expires_at": null,
            "file_size": "1965",
            "mime_type": "image/png",
            "tags": null,
            "file_unique_id": "X7DWcPTJ4mhxwepEJ1z34",
            "status": 2,
            "is_public": true,
            "share_enabled": false,
            "share_path": null,
            "share_expires_at": null,
            "access_secret_enabled": false,
            "access_secret": null,
            "share_view_count": 0,
            "share_dl_count": 0
        }
    ]
}
修改于 2025-10-15 08:07:30
上一页
User query (pagination)
下一页
File download interface (Public file download)
Built with