如何通过DeviantArt API检查一个作品是否带有“使用AI工具创建”免责声明?

人工智能 2026-07-10

我正在尝试使用 DeviantArt API 来检查一幅作品是否带有“使用AI工具创建”的免责声明。(示例)。我编写了能够授权并检索作品扩展元数据的Python代码,但返回的结果并未包含AI免责声明。

代码:

import requests
import os

# Authorize
url = "https://www.deviantart.com/oauth2/token";
params = {
    'grant_type': 'client_credentials',
    'client_id': os.environ['client_id'],
    'client_secret': os.environ['client_secret'],
}
response = requests.get(url, params=params)
access_token = response.json().get("access_token")

# Get deviation metadata
url = 'https://www.deviantart.com/api/v1/oauth2/deviation/metadata'
params = {
    'access_token': access_token,
    'deviationids': {'EBA58C48-2D63-D8D4-8FE1-214FDCD39A65'},
    'ext_submission': 'yes',
}
response = requests.get(url, params=params)
print(response.text)

响应:

{"metadata":[{"deviationid":"EBA58C48-2D63-D8D4-8FE1-214FDCD39A65","printid":null,"author":{"userid":"EF857E1E-E23F-8F8C-E41A-BAD53080D05E","username":"lizschnabel","usericon":"https:\/\/a.deviantart.net\/avatars\/l\/i\/lizschnabel.jpg?4","type":"premium"},"is_watching":false,"title":"Recon Squad and old SSR Intruder Pods","description":"","license":"No License","allows_comments":true,"tags":[{"tag_name":"ai","sponsored":false,"sponsor":""},{"tag_name":"sciencefiction","sponsored":false,"sponsor":""},{"tag_name":"futurewarfare","sponsored":false,"sponsor":""}],"is_favourited":false,"is_mature":false,"submission":{"creation_time":"2023-11-25T08:07:44-0800","category":"","file_size":"5.6 MB","resolution":"3600x2152","submitted_with":{"app":"DeviantArt","url":"https:\/\/www.deviantart.com"}},"can_post_comment":false}]}

是否有不同的API端点可以用来检查某一幅作品是否带有“使用AI工具创建”的免责声明?

解决方案

答案显然是“不能”。下面是关于此问题的几个GitHub讨论:

又一件无法通过OAuth API实现的事。

虽然可以使用metadata选项获取额外的元数据,但包括标签在内的任何元数据字段都没有提及“AI”或“AI生成”。

很可能gallery-dl当前使用的DA OAuth API不支持这一点,就像许多其他“新”的DA功能一样。代码确实需要重写。

站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。

相关文章