Exhibit 5.1

David Peinsipp
+1 (415) 693 2177
dpeinsipp@cooley.com
April 21, 2025
Alumis Inc.
280 East Grand Avenue
South San Francisco, California 94080
Ladies and Gentlemen:
We have acted as counsel to Alumis Inc., a Delaware corporation (the “Company”), in connection with the filing of a Registration Statement on Form S-4 (the “Registration Statement”) with the Securities and Exchange Commission (the “Commission”). The Registration Statement provides for the registration by the Company of (a) the issuance by the Company of up to 5,528,395 shares (the “Merger Shares”) of its voting common stock, par value $0.0001 per share (“Common Stock”), upon consummation of the merger (the “Merger”) of Arrow Merger Sub, Inc., a Delaware corporation (“Merger Sub”), with and into ACELYRIN, Inc., a Delaware corporation (“ACELYRIN”), pursuant to that certain Agreement and Plan of Merger, dated February 6, 2025, as amended on April 20, 2025, by and among the Company, ACELYRIN and Merger Sub (the “Merger Agreement”), and (b) up to an additional 906,555 shares (the “Award Shares”) of Common Stock underlying options, restricted stock unit awards and performance restricted stock unit awards to be converted into equity awards of the Company pursuant to the Merger Agreement. As provided in Rule 429 under the Securities Act of 1933, as amended, the Registration Statement, upon effectiveness, will act as a post-effective amendment to the Registration Statement on Form S-4 (File No. 333-286178) (the “Prior Registration Statement”) filed by the Company with the Commission, which was declared effective on April 4, 2025. This opinion relates solely to the Merger Shares and the Award Shares covered by the Registration Statement. The securities of the Company whose issuance is registered on the Prior Registration Statement are covered by a separate opinion that was filed as an exhibit to the Prior Registration Statement.
In connection with this opinion, we have examined and relied upon (a) the Registration Statement in the form to be filed with the Commission on the date hereof, (b) the Merger Agreement, (c) the Company’s certificate of incorporation and bylaws, each as currently in effect, and (d) such other records, documents, opinions, certificates, memoranda and instruments as in our judgment are necessary or appropriate to enable us to render the opinion expressed below. We have assumed the genuineness of all signatures, the authenticity of all documents submitted to us as originals, the conformity to originals of all documents submitted to us as copies, the accuracy, completeness and authenticity of certificates of public officials, and the due authorization, execution and delivery of all documents by all persons other than the Company where due authorization, execution and delivery are prerequisites to the effectiveness thereof. As to certain factual matters, we have relied upon a certificate of an officer of the Company and have not independently verified such matters.
Our opinion is expressed only with respect to the General Corporation Law of the State of Delaware. We express no opinion to the extent that any other laws are applicable to the subject matter hereof and express no opinion and provide no assurance as to compliance with any federal or state securities law, rule or regulation.
In rendering this opinion, we have assumed that (a) all conditions to the consummation of the transactions contemplated by the Merger Agreement will have been satisfied or duly waived, and all
Cooley LLP 3 Embarcadero Center 20th Floor San Francisco, CA 94111-4004
t: +1 415 693 2000 f: +1 415 693 2222 cooley.com

Alumis Inc.
April 21, 2025
Page Two
approvals of the Merger Agreement and for the issuance of the Merger Shares and the Award Shares have become effective and (b) no shares of Common Stock are issued or commitments to issue Common Stock made by the Company prior to consummation of the Merger of the issuance of the Award Shares.
On the basis of the foregoing, and in reliance thereon, and subject to the qualifications, limitations, assumptions and exceptions set forth herein, we are of the opinion that:
1.The Merger Shares, when issued by the Company pursuant to the Merger Agreement upon the terms and conditions set forth in the Registration Statement, will be validly issued, fully paid and nonassessable.
2.The Award Shares, when the related equity awards have been assumed by the Company pursuant to the Merger Agreement and when the Award Shares are issued pursuant to the agreements governing the corresponding equity awards (such agreements having been established in accordance with the terms and conditions set forth in the Registration Statement and the Merger Agreement), will be validly issued, fully paid and nonassessable.
This opinion is limited to the matters expressly set forth in this letter, and no opinion should be implied, or may be inferred, beyond the matters expressly stated. This opinion speaks only as to law and facts in effect or existing as of the date hereof, and we have no obligation or responsibility to update or supplement this opinion to reflect any facts or circumstances that may hereafter come to our attention or any changes in law that may hereafter occur.
We consent to the reference to our firm under the heading “Legal Matters” in the joint proxy statement/prospectus included in the Registration Statement and to the filing of this opinion as an exhibit to the Registration Statement. In giving such consents, we do not thereby admit that we are in the category of persons whose consent is required under Section 7 of the Securities Act of 1933, as amended, or the rules and regulations of the Commission thereunder.
Sincerely,
Cooley LLP
By: | /s/ David Peinsipp |
| David Peinsipp |
Cooley LLP 3 Embarcadero Center 20th Floor San Francisco, CA 94111-4004
t: +1 415 693 2000 f: +1 415 693 2222 cooley.com