> ## Documentation Index
> Fetch the complete documentation index at: https://gasdocs-zh.gasstation.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 接入引导

本指南将帮助您完成 Gas Station 平台 API 的接入，包括 API 创建、密钥获取及参数加密。

## 步骤 1：在 Gas Station 平台创建 API

1. 登录 Gas Station 平台。
2. 在左侧导航栏选择 **API 管理**。
3. 点击 **创建 API** 按钮，填写相关信息后提交。

   ![创建API 示例](https://mintcdn.com/zhp/2jh_IljgwpoUs47B/images/apis/gas-station-add-api.png?fit=max\&auto=format\&n=2jh_IljgwpoUs47B\&q=85\&s=375c861bb60309ce82a8888cf2c074e8)
4. 创建成功后，API 会出现在 API 列表中。

## 步骤 2：查看 API 的 app\_id 和密钥

1. 在 **API 管理** 页面，找到刚刚创建的 API。
2. 点击该 API 进入详情页。

   ![APi详情示例](https://mintcdn.com/zhp/k_CuKQ-5_f3M9cfV/images/apis/gas-station-api-detail.png?fit=max\&auto=format\&n=k_CuKQ-5_f3M9cfV\&q=85\&s=a29a023010028d4fa9ba8646401378ce)
3. 在详情页可以看到 `app_id`，如需查看 `密钥`，需先通过验签验证身份后方可显示（请妥善保存密钥，避免泄露）。

   ![API验证示例](https://mintcdn.com/zhp/k_CuKQ-5_f3M9cfV/images/apis/gas-station-sign.png?fit=max\&auto=format\&n=k_CuKQ-5_f3M9cfV\&q=85\&s=c10b683d40c3bf6196af73e698057993)

   ![密钥查看示例](https://mintcdn.com/zhp/k_CuKQ-5_f3M9cfV/images/apis/gas-station-key.png?fit=max\&auto=format\&n=k_CuKQ-5_f3M9cfV\&q=85\&s=52542ea5b8052854982543c96d12e895)

## 步骤 3：用密钥对接口请求参数进行 AES 加密

调用 API 时，需将请求参数用密钥进行 AES 加密。常用的 AES 加密模式有 ECB、CBC、CFB、OFB、CTR 等，常用填充方式为 PKCS7。加密前请确认平台要求的加密模式和填充方式。

![AES 加密示例](https://mintcdn.com/zhp/2jh_IljgwpoUs47B/images/apis/gas-station-aes.png?fit=max\&auto=format\&n=2jh_IljgwpoUs47B\&q=85\&s=6d01cfedbde7ef82e37204c9e5c1171e)

> **注意：**
>
> * 密钥长度需与加密算法匹配（如 16 字节对应 AES-128，24 字节对应 AES-192，32 字节对应 AES-256）。
> * 加密前需对明文进行填充，常用 PKCS7 填充。
> * 不同语言实现方式略有差异，请参考官方文档或 SDK。
> * 密钥请妥善保管，切勿泄露。

更多 AES 加密模式、填充方式及在线加解密工具详见 [加密工具](https://anycript.com/crypto)（您即将离开Gas Station，请注意您的账号和财产安全）。


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