Watermark & AIGC Labeling

Generate AIGC Service-Provider Code

0calls
1 credits / call

Still puzzling over how to assemble the 27-character AIGC service-provider code that GB 45438-2025 calls for? Whether you want to generate your own compliant code in one go or check whether an existing one is correct, this endpoint has you covered.

Overview

This endpoint does double duty — generate and validate:

  • Generate mode: provide the subject's identity details (organization or individual) and ID number, and the endpoint handles the intricate assembly rules and returns a standard 27-character code.
  • Validate mode: pass just an existing code, and the endpoint breaks it down segment by segment, checks that it's valid, and parses out what each part means.

Notes

Mutually exclusive modes: when you include a code parameter in the request body, the endpoint switches to validate mode and ignores the other generation parameters; otherwise it runs in generate mode.

Self-contained: the code doesn't require registering with any outside authority — it's assembled on your own from your legal identity (such as an organization's unified social credit code or an individual's ID card) following the standard's rules.

Request body

Generate mode takes subject info; validate mode takes a code (passing a code switches to validation). Both multipart/form-data and application/json are supported.

subject_type
stringoptional

Whether the subject is an organization or an individual.

binding
stringoptional

How the subject is identified. Organizations use the unified social credit code; individuals can use an ID card, mobile number, passport, or network ID.

identifier
stringoptional

The subject's ID number, matching the method above: unified social credit code 18 chars, ID card 18 chars, mobile number 11 digits, passport 9 chars, network ID 10 chars.

service_type
stringoptional

Whether this is a generation or propagation service; only written when a model code is also set.

model_code
stringoptional

An optional 4-character custom model/app code. If omitted, the service segment is just 00000.

code
stringoptional

An existing 27-character code to validate. Set it and the generate parameters above are ignored.

Response

200 / OK

Generated or validated successfully; returns the code and its parsed result.

JSON

400 / Bad Request

Bad request, e.g. incomplete subject info or an invalid code.

JSON