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

# 获取 API Key

> 在 GEOBase 开发者中心创建 API Key，并按需配置有效期与 IP 白名单。

`AIBase-API-Key` 是调用 GEOBase 开发者 API 的唯一凭证。请求统一入口时必须携带该 Header，服务端据此完成身份认证、有效期校验与调用权限校验。

**创建入口：** [GEOBase 开发者中心](https://geoservice.aibase.com/developer)。

<Steps>
  <Step title="进入开发者 API 配置">
    打开 [GEOBase 开发者中心](https://geoservice.aibase.com/developer)，选择创建 API Key。
  </Step>

  <Step title="配置有效期">
    为 Key 设置有效期。生产环境建议设置明确的到期时间并定期轮换，避免长期使用同一把 Key。
  </Step>

  <Step title="配置 IP 白名单（可选）">
    按需填写允许调用的客户端出口 IP。未配置白名单时默认放行；配置后，白名单外的 IP 将返回 `403`。
  </Step>

  <Step title="保存并仅在服务端使用">
    Key 只在创建时完整展示一次，请妥善保存于服务端或密钥管理系统中，不要写入前端代码、移动端 App 或公开代码仓库。
  </Step>
</Steps>

<Warning>
  API Key 仅可在服务端或密钥管理系统中保存和调用。不要将其暴露在浏览器前端、移动端 App、公开代码仓库或完整请求日志中。
</Warning>

<Note>
  Key 创建后还需确认它已被授予目标 `apiCode` 的调用权限。若 Key 开启了权限限制但未被授予某个 API 的调用权限，调用该 `apiCode` 将返回 `403`。
</Note>

<Card title="继续：配置身份认证" icon="arrow-right" href="/geobase-api/quickstart/authentication" horizontal>
  了解请求头设置与服务端的校验顺序。
</Card>


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