Custom GPT Integration Guide

Connect NeuroGen's file sharing to ChatGPT's Custom GPTs for seamless AI-powered document access.

Overview

NeuroGen provides an OpenAPI-compatible API that allows Custom GPTs to: - Access shared files directly - Read document content for context - Process training data from your exports - Download files programmatically

Prerequisites

  1. ChatGPT Plus or Enterprise subscription (for Custom GPT creation)
  2. NeuroGen account with files to share
  3. Share link with Full Access permission

Quick Start

Step 1: Create a Share with Full Access

  1. Go to Dashboard > My Files
  2. Click Share on your file
  3. Select Full Access permission (required for Custom GPTs)
  4. Set expiration to 30 days or Never
  5. Click Create Share Link
  6. Save the share token (the code after /share/)

Step 2: Configure Your Custom GPT

  1. Go to ChatGPT → Create a GPT
  2. In the Configure tab, scroll to Actions
  3. Click Create new action
  4. Click Import from URL
  5. Enter: https://neurogen.cc/share/api/openapi.json
  6. Click Import

Step 3: Update the Schema with Your Token

After importing, update the server URL to include your share token:

servers:
  - url: https://neurogen.cc/share/{your_token_here}

Replace {your_token_here} with your actual share token.

OpenAPI Schema

NeuroGen provides a pre-built OpenAPI schema at:

https://neurogen.cc/share/api/openapi.json

This schema defines all available operations for the Custom GPT.

Available Operations

Get Share Info

GET /share/{token}
Accept: application/json

Returns metadata about the share including file list.

Get File Content

GET /share/{token}/content/{filename}

Returns the raw content of a file. This is the primary endpoint for AI consumption.

Supported formats: - JSON (.json) - Structured data - JSONL (.jsonl) - Line-delimited JSON for training data - Markdown (.md) - Documentation and text - Plain text (.txt, .csv, etc.)

Download File

GET /share/{token}/download/{filename}

Downloads a file (useful for binary files).

Example Custom GPT Instructions

Add these instructions to your Custom GPT:

You have access to a NeuroGen file share containing training data and documents.

When asked about the data:
1. First call the getShareInfo action to see available files
2. Use getFileContent to read specific files
3. Parse the content based on file type (JSON, JSONL, Markdown, etc.)

Available files are in the share at the configured endpoint.
For JSONL files, each line is a separate JSON object.

Password-Protected Shares

If your share has a password:

  1. In the OpenAPI schema, add an X-Share-Password header
  2. Configure the Custom GPT to include this header in requests
  3. The password will be sent with each API call

Schema modification for password:

components:
  securitySchemes:
    sharePassword:
      type: apiKey
      in: header
      name: X-Share-Password

Working with JSONL Training Data

NeuroGen commonly exports JSONL files for AI training. Each line is a separate JSON object:

{"prompt": "What is machine learning?", "completion": "Machine learning is..."}
{"prompt": "Explain neural networks", "completion": "Neural networks are..."}

Your Custom GPT can parse this as: 1. Fetch the file with getFileContent 2. Split content by newlines 3. Parse each line as JSON 4. Use the structured data for responses

Multi-File Shares

When sharing an entire session, the Custom GPT can:

  1. Call getShareInfo to list all files
  2. Loop through files and fetch relevant ones
  3. Combine data from multiple sources

Example instruction for multi-file:

This share contains multiple files. Check getShareInfo first to see
what's available, then fetch specific files as needed for the user's query.

Rate Limits

Custom GPT requests count against share rate limits: - 60 requests per minute - 500 requests per hour

For high-volume use, contact support for increased limits.

Troubleshooting

"Raw content access requires Full Access permission"

Your share doesn't have Full Access. Create a new share with Full Access permission.

"Share not found"

  • Check the token in your URL is correct
  • Verify the share hasn't expired
  • Ensure the share hasn't been revoked

"Password required"

Add the X-Share-Password header to your API configuration.

"File is not text-based"

The /content/ endpoint only works with text files. Use /download/ for binary files.

Custom GPT not seeing updates

If you update shared files: - The share token remains the same - Custom GPT will see new content on next request - No action needed in GPT configuration

Best Practices

  1. Use descriptive share names - Makes it easier to manage multiple shares
  2. Set reasonable expiration - 30 days is good for development, longer for production
  3. Don't share secrets - Custom GPTs may log requests
  4. Monitor access counts - Check the Shares tab for usage
  5. Use session shares - Share entire sessions for related files

Example: Research Assistant GPT

Here's a complete example configuration:

Share Setup: - Export: Academic search results - Permission: Full Access - Expiration: 30 days

GPT Instructions:

You are a research assistant with access to academic paper summaries.

When asked about research topics:
1. Fetch the share info to see available paper summaries
2. Read relevant files using getFileContent
3. Synthesize information from papers to answer questions
4. Cite paper titles and authors when referencing specific works

The data is in JSONL format with fields: title, authors, abstract, url

GPT Conversation Starters: - "What papers are available about machine learning?" - "Summarize the research on neural networks" - "Find papers about natural language processing"

Security Considerations

  1. Share tokens are sensitive - Treat them like passwords
  2. Use expiration dates - Especially for sensitive data
  3. Review active shares - Revoke old or unused shares
  4. Consider access limits - Set maximum access for sensitive content
  5. Don't embed in public GPTs - Use private Custom GPTs for sensitive data

See also: API Reference | File Sharing Guide

Connecting