API Reference

Authorization

This page will help you get started with Authorization.

Users or developers can cover model costs with normal API keys. This allows you to use curl or the OpenAI SDK directly with UniOne AI. Just get an API key, set the api_base:

curl --location 'https://unione.ai/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "your-pass"
}'
curl --location 'https://unione.ai/api/v1/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "phone": "+8613156567878",
    "password": "your-pass"
}'

Response:

{
    "code": 200,
    "msg": "",
    "data": {
        "id": "0f279c07-xxxxx-fbe65546",
        "authorization": "eyJhbGcxxxxx",
        "plan": "free",
        "quotaRequests": {
            "advancedtext": 0,
            "fasttext": 30
        }
    }
}

In the returned JSON structure, the authorization field is the API Key to be used in subsequent requests. Simply place the authorization in the header of the request.