> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取 AceDataCloud 平台服务详情

> Platform 集成指南 - Ace Data Cloud

通过服务 ID（UUID）或别名（alias）获取单个服务的完整信息——比[获取 AceDataCloud 平台服务列表](https://platform.acedata.cloud/documents/platform-service-list) 返回的字段更全，会额外展开 `apis`、`proxies`、`datasets`、`packages` 等关联对象。适用于服务详情页、定价对照页、Agent 工具描述等场景。

> ℹ️ 本接口属于 **AceDataCloud 平台管理 API**，统一前缀 `https://platform.acedata.cloud/api/v1/`。完整接口索引见[获取 AceDataCloud 平台文档列表](https://platform.acedata.cloud/documents/platform-document-list)。

## 接口概览

| 项 | 内容 |
| - | - |
| 方法 | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/services/{service_id}` |
| 鉴权 | ❌ 公开 |

`/services/{id}` 与 `/services/{id}/` 当前都可用；示例统一使用无尾斜杠形式。

## 鉴权说明

本接口完全公开。**但是带上账户令牌后，响应里的 `applied` 字段会反映当前账户的实际申请状态**，否则恒为 `false`。

账户令牌的获取方式见[管理 AceDataCloud 平台账户令牌](https://platform.acedata.cloud/documents/platform-token)。

## 路径参数

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `service_id` | UUID / string | ✅ | 服务 ID（UUID）或别名（`midjourney`、`openai`、`webextrator` 等） |

## 请求示例

### cURL

```shell theme={null}
# 按 UUID 查询
curl 'https://platform.acedata.cloud/api/v1/services/8efa1d83-9b75-4562-b44a-af95ce563d05' \
  -H 'accept: application/json'

# 按 alias 查询
curl 'https://platform.acedata.cloud/api/v1/services/midjourney' \
  -H 'accept: application/json'

# 带账户令牌看 applied 状态
curl 'https://platform.acedata.cloud/api/v1/services/midjourney' \
  -H 'accept: application/json' \
  -H "authorization: Bearer ${PLATFORM_TOKEN}"
```

### Python

```python theme={null}
import os
import requests

resp = requests.get(
    "https://platform.acedata.cloud/api/v1/services/midjourney",
    headers={
        "accept": "application/json",
        "authorization": f"Bearer {os.environ['PLATFORM_TOKEN']}",
    },
    timeout=10,
)
svc = resp.json()
print(f"服务: {svc['title']} ({svc['alias']})")
print(f"已申请: {svc['applied']}, 免费额度: {svc['free_amount']} {svc['unit']}")
print(f"API 数: {len(svc['apis'])}, 套餐数: {len(svc['packages'])}")
for pkg in svc["packages"]:
    print(f"  ¥{pkg['price']:>7.2f}  ->  {pkg['amount']} {svc['unit']}")
```

### Node.js

```javascript theme={null}
const r = await fetch('https://platform.acedata.cloud/api/v1/services/midjourney', {
  headers: { accept: 'application/json' },
})
const svc = await r.json()
console.log(`${svc.title} - 套餐 ${svc.packages.length} 个 - API ${svc.apis.length} 个`)
```

## 响应示例（HTTP 200）

```json theme={null}
{
  "id": "8efa1d83-9b75-4562-b44a-af95ce563d05",
  "alias": "face-transform",
  "title": "人脸变换",
  "description": "人脸识别、替换和风格转换等操作服务。",
  "introduction": "...长文 Markdown...",
  "type": "Api",
  "applied": false,
  "applied_count": 281,
  "free_amount": 1.0,
  "unit": "Credit",
  "private": false,
  "need_verify": false,
  "rank": 0,
  "tags": [],
  "metadata": null,
  "thumbnail": "https://cdn.acedata.cloud/qrd7gw.png/thumb_600x300",
  "doc_url": null,
  "demo_url": null,
  "api_ids": [
    "e4fbc3b6-4f44-48fb-a049-40f5c27c7cd3",
    "2c7f6468-58d9-4611-885b-1e34664d49e9"
  ],
  "proxy_ids": [],
  "cost": [
    {
      "conditions": {
        "==": [
          1,
          1
        ]
      },
      "consumption": 0.0025
    }
  ],
  "apis": [
    {
      "id": "e4fbc3b6-4f44-48fb-a049-40f5c27c7cd3",
      "name": "Face Analyze API",
      "title": "五官定位 API",
      "path": "/face/analyze",
      "stage": "Stable",
      "cost": [
        {
          "conditions": {
            "==": [
              1,
              1
            ]
          },
          "consumption": 0.0025
        }
      ]
    }
  ],
  "proxies": [],
  "datasets": [],
  "packages": [
    {
      "id": "4add61f2-61db-4d1c-85b6-d4876ac122f0",
      "type": "Usage",
      "price": 63.2,
      "amount": 530.0,
      "duration": null,
      "private": false
    }
  ],
  "created_at": "2024-06-11T00:41:29.255614Z",
  "updated_at": "2026-04-26T16:12:40.481154Z"
}
```

## 响应字段说明

详情接口在[列表接口](https://platform.acedata.cloud/documents/platform-service-list)的所有字段之上，额外展开了：

| 字段 | 类型 | 说明 |
| - | - | - |
| `apis` | array | 关联 API 对象的完整列表（每条含 `id`、`name`、`title`、`path`、`stage`、`cost`） |
| `proxies` | array | 关联 Proxy 对象的完整列表 |
| `datasets` | array | 关联数据集（如果 `type=Dataset`） |
| `packages` | array | 套餐列表，含 `type`（`Usage`/`Period`）、`price`、`amount`、`duration` |

其余字段定义参见[获取 AceDataCloud 平台服务列表 → 响应字段说明](https://platform.acedata.cloud/documents/platform-service-list)。

## 错误处理

| HTTP | code | 含义 |
| - | - | - |
| 404 | `not_found` | `service_id`（UUID 或 alias）不存在 |
| 500 | — | 一般是 URL 末尾误加斜杠，去掉后重试 |

## 实用提示

* **`alias` > `UUID`**：把 `alias`（如 `midjourney`）硬编码到代码里更稳定；UUID 在迁移环境时会变。
* **`apis` 字段不包含 OpenAPI 定义**：完整的 OpenAPI 3.0 Schema 在[获取 AceDataCloud 平台 API 详情](https://platform.acedata.cloud/documents/platform-api-detail) 接口里。
* **拉一个服务的"完整能力"**：用本接口拿到 `api_ids`，然后逐个调用 `/apis/{api_id}` 拉详情。
* **如果 `applied=true`**，就可以直接[创建 API 凭证](https://platform.acedata.cloud/documents/platform-credential-create) 拿到调用业务接口需要的 32 位 Token，不需要再申请。

## 相关接口

* [获取 AceDataCloud 平台服务列表](https://platform.acedata.cloud/documents/platform-service-list)
* [获取 AceDataCloud 平台服务下的 API 列表](https://platform.acedata.cloud/documents/platform-service-apis)
* [获取 AceDataCloud 平台服务下的 Proxy 列表](https://platform.acedata.cloud/documents/platform-service-proxies)
* [创建 AceDataCloud 平台服务申请](https://platform.acedata.cloud/documents/platform-application-create)
* [创建 AceDataCloud 平台充值订单](https://platform.acedata.cloud/documents/platform-order-create)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.