Overview
Thebasic-connector allows you to proxy requests to any external API while leveraging UniSkill’s centralized billing, authentication, and rate-limiting systems. It is ideal for integrating niche APIs that aren’t yet available as specialized UniSkill skills.
Usage
Send a POST request to/v1/basic-connector with the target url and optional method, headers, or body.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The absolute URL of the target API. |
method | string | No | HTTP method (Default: GET, recommended: GET or POST). |
headers | object | No | Custom headers to pass to the target. |
body | any | No | JSON payload for the target request. |
Smart Interception & Safety
The Basic Connector includes built-in safety features:- Upstream Error Mapping: If the target service returns a
402(billing issue), UniSkill maps it to a502to avoid confusion with your UniSkill balance. - Header Sanitization: We strip potentially harmful transport headers (like
Content-Encoding) when returning diagnostic errors to prevent client-side crashes.
Response Headers
| Header | Description |
|---|---|
X-UniSkill-Status | Success or Upstream-Error. |
X-UniSkill-Error-Source | Indicates if the error occurred at the Gateway or Upstream. |
X-RateLimit-Remaining | Remaining requests based on your tier. |
X-UniSkill-Balance | Credits remaining after the proxy call. |