{"openapi":"3.1.0","info":{"title":"ISRC-AAM-CID Partner API","version":"1.0.0","description":"Batch issuance of ISRC-AAM-CID codes for AI music platforms. Authenticate with a partner API key issued in the developer portal."},"servers":[{"url":"https://auaimusic.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RoleEntry":{"type":"object","required":["label","level","weight"],"properties":{"key":{"type":"string"},"label":{"type":"string"},"level":{"type":"string","enum":["human","assisted","full"]},"weight":{"type":"number","minimum":0,"maximum":100}}},"RegisterItem":{"type":"object","required":["title","artist","external_ref"],"properties":{"title":{"type":"string"},"artist":{"type":"string"},"ai_involvement":{"type":"string","enum":["human","assisted","full"],"default":"human"},"role_entries":{"type":"array","items":{"$ref":"#/components/schemas/RoleEntry"}},"generator":{"type":"string"},"prompt":{"type":"string"},"lyrics":{"type":"string"},"duration_seconds":{"type":"integer"},"external_ref":{"type":"string"},"provenance_url":{"type":"string","format":"uri"},"release_date":{"type":"string"},"genre":{"type":"string"},"language":{"type":"string"},"cover_cid":{"type":"string"},"work_cid":{"type":"string"},"contact_email":{"type":"string","format":"email"}}},"BatchItemResult":{"type":"object","properties":{"external_ref":{"type":"string"},"status":{"type":"string","enum":["created","duplicate","failed"]},"code":{"type":"string"},"error":{"type":"string"}}},"BatchResult":{"type":"object","properties":{"job_id":{"type":"string"},"submitted":{"type":"integer"},"created":{"type":"integer"},"duplicates":{"type":"integer"},"failed":{"type":"integer"},"environment":{"type":"string","enum":["live","sandbox"]},"request_id":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchItemResult"}}}}}},"paths":{"/api/public/register":{"post":{"summary":"Issue one code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterItem"}}}},"responses":{"200":{"description":"Existing code returned"},"201":{"description":"Code created"},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"}}}},"/api/public/register-batch":{"post":{"summary":"Issue up to 500 codes","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retrying with the same key returns the original result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/RegisterItem"}}}}}}},"responses":{"200":{"description":"Batch processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}}},"400":{"description":"Invalid payload"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited"}}}},"/api/public/register-job/{id}":{"get":{"summary":"Fetch a batch job result","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job found"},"404":{"description":"Not found"}}}},"/api/public/verify":{"get":{"summary":"Verify an issued code","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result"}}}}}}