NeuroGen API Reference

Complete API documentation for NeuroGen's file sharing and storage system.

Base URL

https://neurogen.cc

Authentication

User API (requires login)

User endpoints require session authentication. Log in via the web interface to use these endpoints.

Public Share API (no login required)

Share endpoints use token-based authentication embedded in the URL.


Public Share API

These endpoints allow accessing shared files without authentication.

View Share

GET /share/{token}

View share metadata and file list.

Headers: | Header | Required | Description | |--------|----------|-------------| | Accept | No | application/json for JSON, otherwise HTML | | X-Share-Password | Conditional | Required if share is password-protected |

Response (JSON):

{
  "success": true,
  "share_name": "Training Data Export",
  "description": "LLM training data from web scraping",
  "share_type": "file",
  "files": [
    {
      "name": "training_data.jsonl",
      "size": 1048576,
      "size_human": "1.0 MB"
    }
  ],
  "expires_at": "2026-02-13T00:00:00",
  "download_url": "/share/{token}/download",
  "download_all_url": "/share/{token}/download-all"
}

Download File

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

Download a specific file from a share.

Permission Required: download or full

Headers: | Header | Required | Description | |--------|----------|-------------| | X-Share-Password | Conditional | Required if password-protected |

Response: File binary with appropriate Content-Type

Errors: | Code | Description | |------|-------------| | 403 | View-only permission (download not allowed) | | 401 | Password required | | 404 | File not found |


Download All (ZIP)

GET /share/{token}/download-all

Download all files in a share as a ZIP archive.

Permission Required: download or full

Response: ZIP file containing all shared files


Get Raw Content (AI Agents)

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

Get file content as raw text. This is the primary endpoint for AI agents and Custom GPTs.

Permission Required: full (Full Access only)

Headers: | Header | Required | Description | |--------|----------|-------------| | X-Share-Password | Conditional | Required if password-protected |

Response: Raw file content with appropriate Content-Type: - .jsonapplication/json - .jsonlapplication/jsonl - .mdtext/markdown - Other → text/plain

Example:

curl https://neurogen.cc/share/ABC123/content/training_data.jsonl

Errors: | Code | Description | |------|-------------| | 403 | Share does not have Full Access permission | | 401 | Password required | | 404 | File not found | | 415 | File is binary (not text-based) |


Verify Password

POST /share/{token}/verify-password

Verify password for a protected share and set authentication cookie.

Request Body:

{
  "password": "your_password"
}

Response:

{
  "success": true,
  "message": "Password verified"
}

User Files API

These endpoints require authentication (logged-in user session).

List Exports

GET /api/files/my-exports

List all export sessions for the current user.

Response:

{
  "success": true,
  "sessions": [
    {
      "session_id": "abc12345",
      "session_name": "Web Scraping Results",
      "file_count": 3,
      "total_size": 2097152,
      "created_at": "2026-01-13T00:00:00",
      "files": ["output.json", "data.csv", "report.md"]
    }
  ]
}

List Session Files

GET /api/files/exports/{session_id}

List all files in a specific session.

Response:

{
  "success": true,
  "files": [
    {
      "filename": "output.json",
      "size": 1048576,
      "modified": "2026-01-13T00:00:00"
    }
  ]
}

Download File

GET /api/files/exports/{session_id}/download/{filename}

Download a file from your storage.

Response: File binary


Preview File

GET /api/files/exports/{session_id}/preview/{filename}

Preview file contents.

Response:

{
  "success": true,
  "content": "File contents here..."
}

Download All (ZIP)

GET /api/files/exports/{session_id}/download-all

Download all session files as ZIP.


Delete Session

DELETE /api/files/exports/{session_id}

Delete an entire session and all its files.

Response:

{
  "success": true,
  "message": "Session deleted"
}

Bulk Delete Sessions

POST /api/files/bulk-delete

Delete multiple sessions at once.

Request Body:

{
  "session_ids": ["abc123", "def456", "ghi789"]
}

Response:

{
  "success": true,
  "deleted_count": 3,
  "message": "Deleted 3 session(s)"
}

Create Share

POST /api/files/share

Create a shareable link for a file or session.

Request Body:

{
  "session_id": "abc12345",
  "file_name": "output.json",
  "session_type": "exports",
  "share_name": "My Training Data",
  "description": "LLM training data export",
  "permission": "full",
  "expiration": "30d",
  "password": "optional_password",
  "max_access_count": 100
}

Parameters:

Field Type Required Description
session_id string Yes Session containing the file
file_name string No Specific file (omit for session share)
session_type string No exports, uploads, or academic
share_name string No Friendly name for share
description string No Description text
permission string No view, download, or full (default: download)
expiration string No 1h, 24h, 7d, 30d, or never
password string No Password for protection
max_access_count int No Maximum access limit

Response:

{
  "success": true,
  "share_token": "ABC123...",
  "share_url": "/share/ABC123...",
  "full_url": "https://neurogen.cc/share/ABC123...",
  "expires_at": "2026-02-13T00:00:00"
}

List Shares

GET /api/files/shares

List all shares created by current user.

Response:

{
  "success": true,
  "shares": [
    {
      "share_token": "ABC123...",
      "session_id": "abc12345",
      "file_name": "output.json",
      "share_name": "Training Data",
      "permission": "full",
      "is_active": true,
      "is_valid": true,
      "expires_at": "2026-02-13T00:00:00",
      "access_count": 5,
      "created_at": "2026-01-13T00:00:00"
    }
  ],
  "total_count": 1,
  "active_count": 1
}

Revoke Share

DELETE /api/files/share/{share_token}

Revoke a share link (immediately disables it).

Response:

{
  "success": true,
  "message": "Share link revoked"
}

Storage Summary

GET /api/files/storage-summary

Get storage usage and quota information.

Response:

{
  "success": true,
  "total_size": 104857600,
  "total_size_human": "100 MB",
  "quota": 1073741824,
  "quota_human": "1 GB",
  "usage_percent": 9.77,
  "session_count": 15,
  "file_count": 45
}

OpenAPI Schema

For Custom GPT integration, use our OpenAPI schema:

GET /share/api/openapi.json

This provides a machine-readable API specification for ChatGPT's Custom GPT builder.


Rate Limits

Endpoint Type Limit
Share endpoints 60 requests/minute, 500/hour
User file operations 100 requests/minute
Downloads 30 requests/minute

Error Response Format

All errors follow this format:

{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable message",
    "reference": "ABC12345"
  }
}

The reference can be provided to support for troubleshooting.


Next: Custom GPT Integration

Connecting