---
title: "Import Strategy"
method: POST
path: "/v1/strategies/import"
---

# Import Strategy

`POST /v1/strategies/import`

## Request

- Base URL: `https://api.quantradin.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quantradin.com/v1/strategies/import`
- Auth: none declared

Frictionless import: paste a strategy (Pine / Python / plain English) →
a runnable Quantradin spec. Returns {spec, defaults_applied, mapping_notes,
validation, source_type, label}. 503 when AI is off/unconfigured; 429 over the
rate cap; 422 on an unknown source_type.

Order is fixed: intake guard FIRST (a manipulation / illegal / reckless /
injection / guaranteed-returns request is refused here, before the LLM is
asked to translate anything — the safety floor never depends on the model),
THEN a source-type-aware AI translation, THEN suggest_defaults fills the safe
blanks, THEN validate_spec runs. The engine alone grades — this route only
drafts + validates the spec.

GUEST-FRIENDLY: converting is the home funnel, so a logged-OUT visitor may call it
(per-IP rate-capped); logged-in callers use the per-user gate. The intake safety
guard runs first either way. Running/saving/deploying still needs signup.

## Request body

- ImportRequest
  - `source_type` string, required
  - `source` string, required
  - `fill_gaps` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/quantradin/apis/vega-api.md) · [All operations](https://skmtc.dev/quantradin/apis/vega-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quantradin/apis/vega-api/revisions/47add154ef38?raw)
