canonical: https://jentic.com/apis/osf.io/osf

# OSF APIv2

The Open Science Framework (OSF) APIv2 is the programmatic interface to OSF, the open-source platform for managing research projects, preregistrations, datasets, and collaborator workflows. With 172 endpoints, the API covers projects, components, files, registrations, preprints, wikis, citations, and institutional integrations. It is JSON:API conformant and supports filtering, sparse fieldsets, and embedding, making it well-suited for research data pipelines, registry tooling, and reproducibility audits.

## For AI agents

Manage research projects, preprints, registrations, files, and collaborators on OSF. Agents can publish datasets, fetch project metadata, and submit preregistrations programmatically.

## Scope

Does not handle peer review management, journal publishing, or grant administration - use for research project, file, preprint, and registration management only.

## Capabilities

- Create projects, components, and registrations with collaborators and storage providers
- Upload, version, and retrieve research files via OSF Storage and connected providers
- Submit and search preprints across OSF's preprint services
- Manage citation styles, contributors, and licence metadata on a project
- Look up institutions, users, and their public projects
- Pull collection submissions and actions for moderated registries

## Use cases

### Reproducibility-Ready Project Setup

Research labs use OSF as the canonical home for project metadata, materials, and analysis code. The API creates a project, attaches contributors, links a registration template, and uploads files in a single scripted flow. Teams that publish dozens of studies a year save hours per project by automating this setup instead of clicking through the OSF UI.

Example prompt: Create an OSF project titled 'Replication of Smith 2024' by POSTing to /nodes/, then add a contributor and a registration template via the project's relationships endpoints.

### Preprint Submission Pipeline

Authors who publish to PsyArXiv, SocArXiv, EngrXiv, and other OSF preprint services can automate submission. The API accepts manuscript metadata, uploads the PDF, attaches supplemental files, and posts the preprint to a chosen provider. Reviewers and admins use the same endpoints to list submissions in a moderation queue and act on them.

Example prompt: Submit a preprint to PsyArXiv by POSTing manuscript metadata to /preprints/, uploading the PDF to the returned files endpoint, and confirming the submission status.

### Open Dataset Distribution

Open data initiatives use OSF as a discovery surface for downloadable datasets. The /files and `/nodes/{id}/files` endpoints expose research files with versioning, download counts, and licence metadata. Pairing OSF with a citation generator lets agents return both the dataset URL and a properly formatted citation for any project.

Example prompt: List all files in project 'abc12' by calling GET `/nodes/abc12/files`/ and return the download URLs along with the project's APA citation from `/nodes/abc12/citation/apa/.`

### AI Agent Research Workflow via Jentic

Research-assistant agents that gather literature, organise project files, and draft preregistrations need a programmable OSF layer. Through Jentic, an agent searches for 'create a research project', loads the POST /nodes/ schema, and executes it with the project's metadata. This avoids the need to bake an OSF SDK into every agent loop and lets the agent move fluidly between projects, files, and preprints.

Example prompt: Use Jentic to search 'create a research project on OSF', load the POST /nodes/ schema, and execute it with the project title and category drawn from the agent's draft.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/` | Root API description and links |
| GET | `/addons/` | List available storage and citation addons |
| GET | `/citations/styles/` | List supported citation styles |
| GET | `/citations/styles/{style_id}/` | Get details for a specific citation style |
| POST | `/collection_submission_actions/` | Submit an action against a collection submission |
| GET | `/actions/` | List recent actions across the API |

## Key resources

- **Nodes (Projects)** — Top-level projects and components, including contributors, files, wikis, and citations
- **Files** — Files stored on OSF Storage or connected providers, with versioning and download URLs
- **Preprints** — Preprint submissions across OSF's preprint services
- **Registrations** — Frozen project snapshots used for preregistration and registered reports
- **Users and Institutions** — Public user profiles and institutional groupings
- **Collections** — Curated and moderated collections of projects and registrations

## Why Jentic

- **Setup:** The OSF APIv2 can be read without credentials, but wiring it by hand still means handling any personal access token for writes and mapping the JSON:API node, preprint, and registration routes yourself. Through Jentic you install once, import OSF from the API Directory, store any token once, and your agent calls it.
- **Permission scoping:** You choose which OSF operations the agent may call, so you can limit it to the operations it needs, such as reading addons, citation styles, and actions, while a collection-submission action or any write stays out of the allowed set unless you add them.
- **Credential handling:** Any OSF personal access token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a research project' or 'list citation styles', and Jentic returns the matching OSF JSON:API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Figshare API** — Figshare publishes citable research datasets with DOIs; OSF emphasises full project workflows and preregistration.
- **Crossref API** — Crossref provides DOIs and citation metadata for the publications and preprints that reference OSF projects.
- **Orthanc API** — Orthanc handles DICOM imaging that often underpins research projects then catalogued and shared on OSF.

## FAQ

### What authentication does the OSF API use?

OSF supports OAuth 2.0 personal access tokens for authenticated calls; the published OpenAPI does not declare a security scheme because many endpoints are readable without authentication. Authenticated requests pass the token as Authorization: Bearer. Through Jentic the personal access token is stored encrypted in the vault and injected at call time.

### Can I create a project on OSF through the API?

Yes. POST /nodes/ creates a new project with the supplied title, category, and description. After creation you add contributors, attach storage addons, and upload files using the project-scoped relationships endpoints exposed in the API.

### What are the rate limits for the OSF API?

OSF applies per-IP and per-token throttling that is documented at developer.osf.io rather than in the OpenAPI spec. The API returns 429 Too Many Requests with a Retry-After header once a client exceeds the limit; bulk operations should back off rather than retry immediately.

### How do I retrieve a project's citation through Jentic?

Through Jentic, search for 'get OSF project citation', load the schema for the project's citation endpoint (e.g. `/nodes/{id}/citation/apa`/), and execute it with the project ID. The API returns the formatted citation string in the requested style.

### Does the OSF API support filtering and embedding?

Yes. OSF is JSON:API conformant, so list endpoints accept filter[field], sort, page, page[size], and fields[type] query parameters. The embed parameter inlines related resources, which is useful for fetching a project plus its contributors and files in a single call.

### Is the OSF API free to use?

Yes. OSF is free for researchers and the API is free to call within the documented rate limits. The Center for Open Science, which operates OSF, funds the platform through grants and institutional partnerships.

### Can I limit what my agent is allowed to do with the OSF API?

Yes. Because Jentic One is self-hosted, you set the rules that decide which OSF operations and credentials your agent may use, so you can allow only the operations it needs. For example, you can permit read-only calls such as listing addons, citation styles, and recent actions while keeping writes like creating a project or submitting a collection-submission action out of the allowed set. Those write operations stay unavailable to the agent until you explicitly add them.
