Generate AIGC Service-Provider Code

0calls
1 credits / call

GB 45438-2025 requires a 27-character service-provider code in the metadata. The code follows a fixed assembly rule and is easy to get wrong by hand, so let this endpoint do it — it can build one from your details, or check whether an existing code is valid.

How to use it

  • Generate: fill in the subject details (organization or individual, which ID type, and the ID number), and get back the assembled 27-character code.
  • Validate: pass just a code; the endpoint checks each segment and parses out what it means. Passing code switches it to validation.

There's nothing to apply for — the code is built straight from your own identity details. Organizations use their unified social credit code; individuals can use an ID card, mobile number, passport, or network ID. If you also want to mark whether it's a generation or propagation service, add a 4-character model/app code; leave it out and that segment is just 00000.

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