a2ally™ Sign up

Can I train an AI model on code from GitHub?

Last updated

TL;DR: MIT code: Needs review. GPL-3.0 code: Needs review. Each repository's license decides; training is not named in most code licenses.

Is mIT code allowed under MIT License?

Needs review. The license grants broad rights but attaches conditions (such as keeping notices) to copies and adaptations. Whether a trained model, or its output, is a copy or adaptation that carries those conditions is legally unsettled, and in some places training may fall under an exception such as fair use. A human reviewer should confirm this use for your case.

License: MIT License (MIT, curated)

Duties: attribution, license_notice

Is gPL-3.0 code allowed under GNU General Public License v3.0?

Needs review. The license grants broad rights but attaches conditions (such as keeping notices) to copies and adaptations. Whether a trained model, or its output, is a copy or adaptation that carries those conditions is legally unsettled, and in some places training may fall under an exception such as fair use. A human reviewer should confirm this use for your case.

License: GNU General Public License v3.0 (GPL-3.0-only, curated)

Duties: attribution, license_notice, state_changes, share_alike, source_disclosure

What else should I know?

What are the sources?

How can I check it myself (free, no key)?

{
  "tool": "check_license",
  "arguments": {
    "license": "MIT",
    "intended_use": {
      "model_training": true
    }
  }
}

Computed from a2ally's license profiles; not legal advice. JSON · Markdown

Get a free API key in one call

No card and no email needed. 100 free credits; the license and policy checks stay free without a key.

curl -s -X POST https://www.a2ally.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export A2ALLY_API_KEY=rs_...   # the api_key from the reply (shown once)
curl -s https://www.a2ally.com/v1/licenses/check -H "Authorization: Bearer $A2ALLY_API_KEY" \
  -H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'