> ## Documentation Index
> Fetch the complete documentation index at: https://docs.valyu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Valyu API reference documentation. Copy the OpenAPI spec or import it into Postman and other API tools.

Agent note: Valyu's full docs index is at [/llms.txt](https://docs.valyu.ai/llms.txt) (full text at /llms-full.txt); append `.md` to any page URL for Markdown; hosted docs MCP at [https://docs.valyu.ai/mcp](https://docs.valyu.ai/mcp); integration reference at [/AGENTS.md](https://docs.valyu.ai/AGENTS.md).

## OpenAPI Specification

The full Valyu API is described by an OpenAPI 3.0 specification. You can use it to generate client libraries, import into API tools, or explore the API programmatically.

<div style={{ display: "flex", gap: "0.75rem", flexWrap: "wrap", marginTop: "1rem", marginBottom: "1.5rem" }}>
  <button className="copy-openapi-btn">Copy OpenAPI Spec</button>

  <a href="https://docs.valyu.ai/api-reference/openapi.json" target="_blank" rel="noopener noreferrer" style={{ display: "inline-flex", alignItems: "center", gap: "0.5rem", padding: "0.5rem 1rem", fontSize: "0.875rem", fontWeight: 500, borderRadius: "0.5rem", border: "1px solid var(--border)", color: "var(--text-secondary)", textDecoration: "none" }}>
    View Raw JSON
  </a>
</div>

## Import into Postman

You can import the Valyu OpenAPI spec directly into Postman to test all endpoints interactively.

<Frame>
  <img src="https://mintcdn.com/valyu/k0mqs04KtAf53VtP/images/postman-openapi-import.gif?s=220924ddfad95fe982cf292fe22079aa" alt="Importing the Valyu OpenAPI spec into Postman" width="1140" height="720" data-path="images/postman-openapi-import.gif" />
</Frame>

<Steps>
  <Step title="Copy the spec URL">
    Copy this URL: `https://docs.valyu.ai/api-reference/openapi.json`
  </Step>

  <Step title="Open Postman and import">
    In Postman, click **Import** and paste the URL. Postman will generate a complete collection with all Valyu endpoints.
  </Step>

  <Step title="Add your API key">
    Set the `x-api-key` header to your API key in the collection variables. Valyu authenticates with the `x-api-key` header on every request - not a `Bearer` token.
  </Step>
</Steps>

<Note>
  Every request authenticates with the `x-api-key` header. This also works with other API tools like Insomnia, Bruno, and HTTPie - any tool that supports OpenAPI 3.0 imports can use this spec.
</Note>

## Built for agents

This reference is machine-readable. Point your coding agent at it directly:

<Columns cols={3}>
  <Card title="/llms.txt" icon="robot" href="https://docs.valyu.ai/llms.txt">
    A curated index of every page for LLM consumption. `llms-full.txt` has the full text.
  </Card>

  <Card title="Docs MCP server" icon="plug" href="https://docs.valyu.ai/mcp">
    Connect an MCP client to `docs.valyu.ai/mcp` to let your agent search the docs live.
  </Card>

  <Card title="Per-page Markdown" icon="file-code" href="https://docs.valyu.ai/api-reference/endpoint/search.md">
    Append `.md` to any page URL for raw Markdown, including the full spec on endpoint pages.
  </Card>
</Columns>

## Endpoints

<CardGroup cols={2}>
  <Card title="Search" icon="magnifying-glass" href="/api-reference/endpoint/search">
    Search the web, research papers, financial data, and proprietary datasets.
  </Card>

  <Card title="Contents" icon="file-lines" href="/api-reference/endpoint/contents">
    Extract clean, structured content from any URL.
  </Card>

  <Card title="Answer" icon="message" href="/api-reference/endpoint/answer">
    AI-powered answers grounded in real-time search results.
  </Card>

  <Card title="DeepResearch" icon="flask" href="/api-reference/endpoint/deepresearch-create">
    Comprehensive multi-step research with detailed reports.
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/api-reference/endpoint/workflows-list">
    Templated, versioned DeepResearch for repeatable analyses. <Badge>Beta</Badge>
  </Card>

  <Card title="Datasources" icon="database" href="/api-reference/endpoint/datasources-list">
    List and explore available data sources.
  </Card>
</CardGroup>
