Is there an $L$ like inner model for $\sf Z$? Godel proved the consistency of the axiom of choice with the axioms of $\sf ZF$ by showing that given any model of $\sf ZF$, there is a definable class which satisfies $\sf ZFC$.
The proof uses a lot of the power of $\sf ZF$, in particular it uses transfinite recursion which is equivalent to the axiom schema of replacement. And also the fact that we can talk about the ordinals as objects in the universe by looking at the von Neumann ordinals.
Let $\sf Z$ denote Zermelo set theory, which is obtained by removing replacement and foundation from $\sf ZF$ and adding the separation schema instead. This is a strictly weaker theory than $\sf ZF$. We know that if $\delta>\omega$ is a limit ordinal, then $V_\delta\models\sf Z$ (and in fact more, since it also satisfies foundation).
One interesting difference is that while $\sf Z+AC$ is sufficient to prove that every set can be well-ordered, it cannot prove that every set is equipotent with a von Neumann ordinal. Since, for example in $V_{\omega+\omega}$ there are only countably many von Neumann ordinals, all of which are countable, but there are uncountable sets (and one can arrange that there are uncountably many different cardinals amongst them).

Is there an inner model construction, internal to $\sf Z$, which acts like $L$ in proving the consistency of $\sf Z$ with additional axioms? If not, how about an external construction? Will the answer change if we add back the axiom of foundation?

 A: 
This answer is based on Adrian Mathias' majestic paper The Strength of MacLane Set Theory (published in the Annals of Pure and Applied Logic, 2001).

Let $\sf{M}$ be the system of set theory whose axioms consist of Extensionality, Null Set, Pairing, Union, Set Difference ($x\setminus y$ exists), Power set, $\Delta_0$-Seperation, Foundation, Transitive Containment (every set is a subset of a transitive set), and Infinity.
It has long been known that Zermelo set theory plus Foundation does not prove Transitive Containment (as shown by Schröder and Jensen, and Boffa).
According to Mathias (see the paragraph before Theorem 1 in the introduction), Gödel's original construction of L can be implemented within $\sf{M}$ to yield the following theorem that can be proved within Primitive Recursive Arithmetic. But the proof, according to Mathias, is quite cumbersome.  To my knowledge the full proof of this theorem has not appeared in print.
Theorem. If $\sf{M}$ is consistent, then so is $\sf{M}$ + KP (Kripke-Platek set theory) + $\Sigma_1$-Seperation + $V=L$.
In his paper, Mathias provides the proof of a slightly weaker result, where the hypothesis of the consistency of $\sf{M}$ is strengthened to the consistency of $\sf{M}$ augmented with the axiom H (introduced in section 2 of his paper).
Let me also remark that the usual construction of L that one sees in set theory texts, on the other hand, can be smoothly carried out in KP + Infinity.
Addendum. See also Avshalom's comment below, which includes an outline (provided by Mathias) of how certain results in Mathias' paper can be used to demonstrate Con(Z) => Con(Z + AC),
