Web API Documentation

v0.12.19
Alpha Release — API endpoints and rate limits are provisional.
Campaign API Key: scitex-cloud-campaign-20260101-20261231-alpha

🚀 Getting Started

Introduction

The SciTeX Web API lets you search academic papers, create publication-ready plots, and run statistical tests — all via simple HTTP requests. Upload CSV files or pass data inline. No SDK required.

Which API Should I Use?

SciTeX offers two complementary access methods — choose based on your use case:

MCP Server

Best for: Claude Desktop, Claude Code, AI agents

  • 100+ tools via Model Context Protocol
  • Natural language → direct tool calls
  • No HTTP wiring needed
→ MCP Server docs
REST API

Best for: Python scripts, curl, web apps

  • Standard HTTP endpoints
  • Scholar, Plot, Stats, Writer, Project
  • JSON responses, no special client needed
→ Quick Start below

Authentication

SciTeX uses Bearer token authentication. You can authenticate using either JWT tokens (for user sessions) or API keys (for programmatic access).

Step 1: Obtain Access Token

Exchange your credentials for an access token:

POST /api/token/
Request
curl -X POST https://scitex.ai/api/token/ \
  -H "Content-Type: application/json" \
  -d '{
    "username": "your_username",
    "password": "your_password"
  }'
Response
{
  "access": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "refresh": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
}

Step 2: Use the Token

Include the access token in the Authorization header:

curl https://scitex.ai/scholar/api/search/?q=neural+networks \
  -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..."
Token Expiry

Access tokens expire after 60 minutes. Use the refresh token to obtain a new access token without re-authenticating.

Refresh Token

POST /api/token/refresh/
curl -X POST https://scitex.ai/api/token/refresh/ \
  -H "Content-Type: application/json" \
  -d '{"refresh": "your_refresh_token"}'

Generate an API Key

API keys provide long-lived access for scripts and integrations. Generate your API key at:

Manage API Keys

Using Your API Key

curl https://scitex.ai/scholar/api/search/?q=machine+learning \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx"
Keep Your API Key Secret

Never expose your API key in client-side code or public repositories. Use environment variables to store keys securely.

Quick Start

Get up and running in 5 minutes with this example workflow.

1

Search for Papers

Find relevant papers using the unified search API:

curl "https://scitex.ai/scholar/api/search/?q=deep+learning+neuroscience" \
  -H "Authorization: Bearer YOUR_TOKEN"
2

Save Papers to Library

Add interesting papers to your library:

curl -X POST "https://scitex.ai/scholar/api/save-paper/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"doi": "10.1038/s41586-021-03819-2"}'
3

Export Citations

Export your library as BibTeX for your manuscript:

curl "https://scitex.ai/scholar/api/export/bibtex/" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -o references.bib

Error Handling

SciTeX uses conventional HTTP response codes to indicate success or failure.

Code Status Description
200 OK Request succeeded
201 Created Resource created successfully
400 Bad Request Invalid request parameters
401 Unauthorized Missing or invalid authentication
403 Forbidden Access denied to this resource
404 Not Found Resource doesn't exist
429 Too Many Requests Rate limit exceeded
500 Server Error Something went wrong on our end

Error Response Format

{
  "error": {
    "code": "invalid_request",
    "message": "The 'q' parameter is required",
    "details": {
      "field": "q",
      "reason": "missing_required_field"
    }
  }
}

Rate Limits Alpha

Alpha Release: Current rate limits are provisional and will be adjusted based on demand and server capacity.

API rate limits protect the service and ensure fair usage for all users.

Anonymous

10

requests/min

  • No setup required
  • Public API only
  • Per IP address

Registered

100

requests/min

  • Personal API key
  • All features
  • Per API key

Rate Limit Headers

Check your current rate limit status in the response headers:

X-RateLimit-Limit: 50
X-RateLimit-Remaining: 49
X-RateLimit-Window: 60
X-RateLimit-KeyType: campaign