APIshop Documentation
Integration Basics

Authentication

All interfaces that require authentication depend on the API Key. When making requests, put the Key in the request headers, and do not place it in the URL or in publicly exposed frontend code.

渠道地址
Online debugging/docs/support/debug
Error code/docs/support/error-codes

Request header format

  • - Use `Authorization: Bearer sk-xxxx`.
  • - If the endpoint requires JSON, also set `Content-Type: application/json`.
  • - Do not expose the real Key in the browser address bar.

Key Usage Principles

  • - Use different Keys for different environments.
  • - Do not put test `Key` directly into the production environment.
  • - Revoke the Key immediately if it is exposed, and generate a new one.

Authentication Failure Troubleshooting

  • - First, confirm whether the Key has expired or was copied incorrectly.
  • - Double-check that the Base URL, path, and model name match.
  • - If it returns 401 / 403, first check whether the request headers were overridden by the client.

说明

  • - Authentication issues are mostly configuration problems rather than API logic problems.
  • - When troubleshooting, we recommend first reproducing the issue on the online debugging page, then returning to the client to verify the configuration.