Skip to main content

intermediate · 6 min read

Deploy a prediction API

Turn a trained model into a REST endpoint your backend can call.

{ TODO: replace with real step-by-step. This is a Phase 2 mock. }

Prereq

A trained model in any Langsat project. If you don’t have one, follow Train your first model in 5 minutes.

Step 1 — Get an API key

Settings → API Keys → Create key. Copy the rdl_... string — you won’t see it again.

Step 2 — Call the predict endpoint

curl -X POST https://api.langsat.ai/v1/predict \
  -H "Authorization: Bearer rdl_..." \
  -H "Content-Type: application/json" \
  -d '{"model_id": "abc-123", "input": { "customer_id": "C-42" }}'

Response:

{ "prediction": 0.78, "confidence": 0.81, "explanation": [...] }

Step 3 — Batch predictions

For thousands of rows at a time, use Predictions → Batch. Upload a CSV of entity IDs; download predictions as CSV.

Step 4 — Rate limits & pricing

Every API call deducts credits proportional to tier. See Pricing for per-call cost.

{ TODO: add auth flow diagram, retries, webhook callbacks section. }

Ready to try it?

Free tier — no credit card.