Docsmarket-quickstart
market-quickstart
This section provides detailed documentation for this API endpoint. Refer to the examples below to integrate this API into your application.
Example Request
curl -X POST /api/llm/generateTask/market-quickstart \ -H "Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhay03NDJ3eEFMTUpqVEE5Z0czemNFSklZSTJIZkFxZ2x2YiIsImV4cCI6MTc3NTY5NjE5fQ.RRyCU9B0XzQMrTrZZD0dxmc9A" \ -H "Content-Type: application/json" \ -H "API-KEY: API key, ak- followed by the api-key" \ -d '{ "model": "example-model", "messages": [ { "role": "user", "content": "Hello!" } ] }'Authorization generation (Java): //ak and sk are API key pairs created in API management (keep secret) public static String sign(String ak,String sk) { try { Date expiredAt = new Date(System.currentTimeMillis() + 1800*1000); // Expiration time, example: current time + 1800s (30min) Date notBefore = new Date(System.currentTimeMillis() - 5*1000); //Effective time, example: current time - 5 seconds Algorithm algo = Algorithm.HMAC256(sk); Map<String, Object> header = new HashMap<String, Object>(); header.put("alg", "HS256"); return JWT.create() .withIssuer(ak) .withHeader(header) .withExpiresAt(expiredAt) .withNotBefore(notBefore) .sign(algo); } catch (Exception e) { log.error("Signature calculation failed", e); return null; } }
