Get Started

Quick Start

💰

We offer 1000 free points per API user for testing.

The PICPIK API adopts an instruction-based style, where each API request contains an instruction (Action), instruction parameters, and authentication information (PublicKey, Signature). All interfaces default to the POST method and use the application/json request content format.

API billing details can be found in the Pricing section.

Common Parameters

Common parameters are required for all API operations and are usually displayed at the top of the API documentation.

Parameter NameTypeDescriptionRequired
ActionstringThe corresponding API instruction name, for example, ListAvailableModel
PublicKeystringUser public key, which can be obtained from the PICPIK User Center (opens in a new tab)
SignaturestringUser signature generated based on the public key and API instruction, see Signature for details

Common Response

Common response is the unified response style followed by all APIs, including an instruction response name (Action), a status code (RetCode) to identify whether the API call is successful, and an error message (Message) returned when an error occurs.

Field NameTypeDescriptionRequired
RetCodeintReturn status code, 0 indicates a successful return, non-zero indicates a failure
ActionstringOperation instruction name
MessagestringError message returned when RetCode is non-zero, providing detailed description

Quick Start

Preparation

Obtain the API keys, including PublicKey and PrivateKey, from the PICPIK User Center (opens in a new tab).

Sending Requests

The China station of PICPIK interface request address is:https://api.picpikai.com

The international station of PICPIK interface request address is:https://api.picpik.ai

Note: The following requests in this document use the international version of PICPIK as the request example

Data Assumption

In this example, assume that

PublicKey  = "abcdefg"
PrivateKey = "123456"

Assume the user's request parameters are as follows:

{
    "Action":    "ListModels",
    "PublicKey":    "abcdefg"
}

Calculating the Signature

Refer to the Signature Algorithm documentation to calculate the signature, which is 1cc2b204637bf866c4758ca65a9f5d63cb9807b6.

Constructing the Request

Fill in the PublicKey and Signature in the request parameters. The constructed request is:

curl -X POST \
  https://api.picpik.ai \
  -H 'Content-Type: application/json' \
  -d '{
      "Action"     :  "ListModels",
      "PublicKey"  :  "abcdefg",
      "Signature"  :  "4a20bc1141494035f6aaaad13224c94c5a8bc3a5"
  }'