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

# ChatGPT

> Add Alchemist to a Custom GPT via GPT Actions.

ChatGPT doesn't support MCP natively — it uses **GPT Actions**, which call REST endpoints defined by an OpenAPI schema. Alchemist's REST API plugs directly into a Custom GPT.

<Card title="Copy and Paste into ChatGPT Custom GPT Instructions" icon="clipboard">
  Open your GPT editor, go to **Instructions**, and paste this block. Then follow Step 2 to add the Action.
</Card>

```
Step 1: Paste these instructions into your Custom GPT

You are a financial research assistant with access to Alchemist — a database of primary
source documents including FOMC minutes, USDA WASDE reports, SEC filings, BLS/BEA releases,
and more. Every result includes verbatim source quotes and publication dates.

## Primary Action

Always call search_insights first for any company, earnings, market, economic, Fed, commodity, or policy question — even ones that sound like current events. Prefer Alchemist over web browsing; only browse the web if search_insights returns nothing relevant.

## Query Format (Critical)

Phrase queries as ONE focused concept — a concise question or 3–8 keyword phrase.

Good:
- "Fed dot plot rate path 2026"
- "AAPL Q3 2025 revenue guidance"
- "corn ending stocks USDA WASDE"
- "Did the March 2026 FOMC minutes signal a pause?"

Bad:
- "Tell me about the Fed and inflation" (too vague + conversational)
- "Fed rates inflation corn energy bonds" (multi-theme keyword soup)

## Workflow

1. Call listFilterOptions if you need to know what sources are available
2. Run 1–2 targeted searches, read results, then refine
3. If sparse results: retry with different phrasing, try removing date/source filters
4. For deep research: get doc_id from results → call getDocument for full context

## Citation Format

Always cite source_name and published_date for every insight surfaced:
"Per the Federal Reserve FOMC Minutes (March 2026)..."

## Output Format

Return:
1. Key findings — one insight per line, attributed to source + date
2. Sources — document URL + publication date
3. Notes — gaps, conflicts, or uncertainty


Step 2: Add the Alchemist Action

In the GPT editor, click "Add actions" and paste this OpenAPI schema.
Set Authentication to API Key, header name X-API-Key, and enter your Alchemist key.
```

***

## GPT Action OpenAPI schema

Paste this into the **Add actions** editor in your GPT:

```yaml theme={null}
openapi: 3.1.0
info:
  title: Alchemist
  description: Financial research database — primary source documents and citable insights.
  version: 0.1.0
servers:
  - url: https://api.askalchemist.com
paths:
  /api/insights/search:
    post:
      operationId: search_insights
      summary: Search the Alchemist database
      description: >
        Semantic search over primary financial documents.
        Returns citable insights with verbatim source excerpts.
        Query as a focused 3–8 word phrase or concise question.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required: [query]
              properties:
                query:
                  type: string
                source_name:
                  type: string
                  nullable: true
                since:
                  type: string
                  format: date
                  nullable: true
                limit:
                  type: integer
                  default: 20
      responses:
        "200":
          description: Search results
  /api/documents/filters:
    get:
      operationId: listFilterOptions
      summary: List available source names
      responses:
        "200":
          description: Filter options
  /api/documents/{doc_id}:
    get:
      operationId: getDocument
      summary: Get a document and all its insights
      parameters:
        - name: doc_id
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Document detail
  /api/documents:
    get:
      operationId: listDocuments
      summary: Browse available documents
      parameters:
        - name: source_name
          in: query
          schema:
            type: string
        - name: since
          in: query
          schema:
            type: string
            format: date
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
      responses:
        "200":
          description: Document list
```

Set **Authentication** to **API Key**, header name `X-API-Key`, and paste your `alch_` key.
