Optiq Code — Deterministic Code Context Engine for AI Agents

Optiq Code is a deterministic context retrieval engine for software repositories. It parses source code into abstract syntax trees (ASTs), builds dependency graphs, and creates hybrid search indexes combining semantic vector search with keyword matching. When an AI coding agent needs to find relevant code, Optiq returns ranked results with function signatures, call graphs, and confidence scores — in approximately 1-2 seconds.

Key Features

When to Use Optiq

Use Optiq when your AI coding agent needs to find the right function in a large codebase without scanning every file, understand how code connects across modules, get precise context windows instead of dumping entire files into the prompt, or reduce hallucination by providing verified, ranked code context.

How It Works

  1. Index: Point Optiq at your repository. It parses every file into an AST, extracts symbols, and builds a dependency graph.
  2. Search: Query with natural language or structured filters. Optiq combines semantic and keyword search to find the most relevant code.
  3. Retrieve: Get ranked results with function signatures, confidence scores, and cross-file context — ready for your AI agent's prompt.

API

Base URL: https://api.optiqcode.com

MethodEndpointDescription
POST/api/v1/searchSearch indexed code with natural language
POST/api/v1/reposIndex a repository
GET/api/v1/reposList indexed repositories
GET/api/v1/jobs/{job_id}Check indexing job status
GET/api/v1/healthHealth check (no auth required)

Full API specification: OpenAPI 3.1 spec

Authentication

All API requests require a Bearer token. Get your API key from the dashboard (self-serve, no credit card required). Keys support scoped permissions: search:read, repos:read, repos:write, repos:delete, jobs:read.

OAuth Discovery

Authorization server metadata: /.well-known/oauth-authorization-server. Supports PKCE with S256 code challenge method.

Rate Limits

Every API response includes rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After (on 429 responses).

PlanSearchIndexWindow
Free100/day10/day24h rolling
ProUnlimitedUnlimited1min sliding
EnterpriseCustomCustomCustom

Streaming

Add Accept: text/event-stream for Server-Sent Events (SSE) during indexing and search. Events include progress updates and streamed results with confidence scores.

Error Handling

All errors return structured JSON: {"error": {"code": "...", "message": "...", "hint": "..."}}. HTTP status codes: 400 (bad request), 401 (unauthorized), 403 (forbidden scope), 404 (not found), 429 (rate limited), 500 (server error).

MCP Server Integration

Optiq exposes an MCP server for direct AI agent integration.

Discovery

MCP Tools

ToolDescriptionRead-only
optiq_searchSearch indexed code with natural language queriesYes
optiq_indexIndex a directory for code searchNo
optiq_reposList indexed repositories and statusYes
optiq_statusCheck indexing job progressYes

Pricing

PlanPriceReposLinesQueries
Free$0/month350,000100/day
Pro (Free during beta)$0/monthUnlimitedUnlimitedUnlimited
EnterpriseCustomUnlimitedUnlimitedCustom

Machine-readable pricing: /pricing.md

Installation

npm install -g @optiqcode/cli
optiq login
optiq index .
optiq search "your query"

Supported Languages

Python, TypeScript, JavaScript, TSX, Rust, Go, Java, C, C++, Ruby, PHP, C#

Integrations

Works with Cursor, Windsurf, VS Code, JetBrains, Neovim, Claude Desktop, Claude Code, and any MCP-compatible client.

Compare

See how Optiq compares to grep, GitHub Code Search, Sourcegraph, and embedding-only RAG.

Machine-Readable Discovery