The answer is seven, if I have correctly understood the question. **Claim 1:** If $C$ is an irreducible curve in $\mathbb P^3$ of degree $d \leq 6$, then there exists a cubic surface containing $C$. *Proof:* First, note that it suffices to prove that there exists a cubic surface containing $3d+1$ distinct points on $C$. This is because a degree $3$ surface that does not contain $C$ can intersect $C$ in at most $3\cdot\deg C$ distinct points. The complete linear system of all cubic surfaces in $\mathbb P^3$ has dimension $\binom{3+3}{3}-1 = 19$. If $V$ is any linear system and $p$ is a point, then the subsystem of $V$ consisting of divisors containing $p$ has dimension either $\dim V$ or $\dim V - 1$. Thus, if we choose $3d+1$ points on $C$, the space of all cubic surfaces containing these $3d+1$ points has dimension greater than or equal to $$19-(3d+1) = 18-3d.$$ If $d \leq 6$, then this dimension is nonnegative, showing that the space of cubics containing these points is nonempty. $\square$ **Claim 2:** If $C$ is a general rational curve in $\mathbb P^3$ of degree $d \geq 7$, then $C$ is not contained in any cubic surface. *Proof:* First, by semicontinuity, it suffices to show that there exists a (possibly reducible) genus zero curve of degree $d$ that is not contained in any cubic surface. If $d=7$, such a curve may be exhibited by choosing morphism $$[t,s] \mapsto [t^7, st^6, s^6t, *t^7 + *st^6 + *s^2t^5 + \dotsb + *s^7]$$ where the $*$'s denote random (general) coefficients. This gives a morphism $\mathbb P^1 \to \mathbb P^3$. Computing the homogeneous ideal of polynomials that vanish on its image (e.g., using Macaulay2) will reveal that no homogeneous polynomials of degree $\leq 3$ vanish on this rational curve. If $d > 7$, take a union $C = C'' \cup C'$, where $C''$ is a rational curve of degree $7$ that does not lie on any cubic surface and $C'$ is a rational curve of degree $d-7$ such that the two curves intersect in exactly one point (which is a node). Clearly, $C$ is not contained in any cubic surface; a generic deformation of $C$ will be a smooth rational curve of degree $d$, and by semicontinuity, will not be contained in any cubic surface. $\square$