---
title: "Compile a free-text prompt into a CompiledQuery (no analysis created)"
method: POST
path: "/v1/parse"
tags: ["meta"]
---

# Compile a free-text prompt into a CompiledQuery (no analysis created)

`POST /v1/parse`

## Request

- Base URL: `https://api.primateintelligence.ai`
- URL: `https://api.primateintelligence.ai/v1/parse`
- Auth: none declared

Stateless prompt compiler. Auth optional (anonymous allowed); rate-limited to 30 req/min per IP. Never touches the GPU and never burns credits — use POST /v1/analyses with validate_only:true when you also want cost/assessability estimates.

## Request body

- ParseRequest
  - `prompt` string, required: Free-text video question. Must be a non-empty string.

## Response `200`

The compiled query and which parser produced it.

- ParseResponse
  - `compiled_query` object, required: CompiledQuery — canonical JSON Schema served at /v1/schemas/compiled-query.json. Same structure accepted by POST /v1/analyses `query`.
  - `parse_mode` 'haiku' | 'heuristic', required: How the prompt was compiled: "haiku" = LLM parser; "heuristic" = deterministic fallback (used when the LLM is unavailable).

## Other responses

- `400`: empty_prompt — prompt missing, not a string, or blank.
- `422`: parse_failed — prompt could not be compiled into a query.
- `429`: rate_limit_exceeded (30 req/min per IP).
- `503`: parse_unavailable — parse service temporarily unavailable.

---

[API](https://skmtc.dev/primateintelligence/apis/primate-vision-api.md) · [All operations](https://skmtc.dev/primateintelligence/apis/primate-vision-api/llms.txt) · [OpenAPI document](https://skmtc.dev/primateintelligence/apis/primate-vision-api/revisions/aa51b01dc8ad?raw)
