Know of an official OpenAPI document? Contribute it →
For Agents
Create, list, and retrieve pastes on Pastebin.com with visibility controls, expiry settings, and syntax highlighting for 200+ languages. Authenticate users to manage their paste collections.
Use for: I need to create a paste with a specific expiry time, I want to share code as an unlisted paste, Retrieve the raw content of a Pastebin paste, List all pastes in my Pastebin account
Not supported: Does not handle file hosting, image uploads, or collaborative editing - use for text paste creation, retrieval, and lifecycle management only.
Jentic publishes the only available OpenAPI specification for Pastebin API, keeping it validated and agent-ready. The Pastebin API provides programmatic access to the largest public text storage and sharing service, offering 3 POST endpoints for user authentication, paste creation with visibility and expiry controls, and raw paste content retrieval. It supports creating public, unlisted, and private pastes with configurable expiration periods and syntax highlighting for over 200 programming languages.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Pastebin API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fpastebin.com%2Fpastebin" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fpastebin.com%2Fpastebin" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Pastebin API.
Create pastes with public, unlisted, or private visibility settings
Set paste expiration from 10 minutes to never-expire
Apply syntax highlighting from over 200 supported languages
Authenticate users to access their paste collections
Retrieve raw paste content by paste key
List and delete pastes belonging to an authenticated user
Patterns agents use Pastebin API for, with concrete tasks.
★ Code Sharing with Visibility Controls
Create text pastes with configurable visibility (public, unlisted, or private) through the Pastebin API. Public pastes appear in the site's recent paste feed, unlisted pastes are accessible only via direct URL, and private pastes require user authentication. Each paste can include syntax highlighting for any of 200+ supported languages and a title for identification.
Create an unlisted paste via POST /api_post.php with api_paste_private=1, api_paste_format=python, and api_paste_expire_date=1H
Automated Paste Lifecycle Management
Authenticate with the Pastebin API to manage a user's paste collection programmatically. After obtaining a session key via the login endpoint, you can list all pastes, retrieve their raw content, or delete pastes that are no longer needed. Expiry settings provide automatic cleanup, but manual deletion is available for immediate removal of sensitive content.
Authenticate via POST /api_login.php to get a user_key, then list all user pastes via POST /api_post.php with api_option=list
Temporary Credential and Config Sharing
Share temporary configuration files or credentials via Pastebin with short expiry periods. Create a private paste with a 10-minute expiration so the content auto-deletes after the recipient retrieves it. The paste key is returned immediately and can be shared through secure channels for one-time access.
Create a private paste with 10-minute expiry via POST /api_post.php with api_paste_private=2, api_paste_expire_date=10M, containing the configuration content
AI Agent Paste Operations via Jentic
AI agents create and manage Pastebin pastes through Jentic to share code output, logs, or generated content during automated workflows. Jentic provides operation discovery and handles the multi-parameter POST body construction, including developer key injection, visibility settings, and expiry configuration without agents needing to memorize the form-encoded parameter names.
Search Jentic for 'create a code paste on Pastebin', load the operation schema, and execute with content, format=python, and visibility=unlisted parameters
3 endpoints — jentic publishes the only available openapi specification for pastebin api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/api_post.php
Create, list, or delete pastes
/api_login.php
Authenticate and get user session key
/api_raw.php
Retrieve raw paste content
/api_post.php
Create, list, or delete pastes
/api_login.php
Authenticate and get user session key
/api_raw.php
Retrieve raw paste content
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Pastebin API by hand means learning its form-encoded developer-key and session-key conventions, setting the pastebin.com/api host, and shaping api_post, api_login, and api_raw form fields yourself. Through Jentic you install once, import the Pastebin API from the API Directory, store the developer key once, and your agent calls it.
Permission scoping
The target paste travels in the form body rather than the URL path, so you limit the agent to the operations it needs, such as creating a paste or fetching raw paste content. You choose the operations it may call, so the login operation is not included unless you add it.
Credential isolation
Your Pastebin developer key and any user session key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'create a private paste with an expiry' or 'get the raw text of a paste', and Jentic returns the matching Pastebin operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Pastebin API through Jentic.
Why is there no official OpenAPI spec for Pastebin API?
Pastebin does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Pastebin API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.
What authentication does the Pastebin API use?
The API uses a developer API key (api_dev_key) included in every POST request body. For user-specific operations like listing or deleting pastes, you first obtain a session key via POST /api_login.php and include it as api_user_key in subsequent requests. Through Jentic, both keys are stored securely in the vault.
Can I create private pastes through the API?
Yes. Set api_paste_private=2 in the POST /api_post.php request body for private pastes (only visible to the authenticated user), api_paste_private=1 for unlisted (accessible via URL only), or api_paste_private=0 for public pastes.
What paste expiry options are available?
The api_paste_expire_date parameter accepts values including N (never), 10M (10 minutes), 1H (1 hour), 1D (1 day), 1W (1 week), 2W (2 weeks), 1M (1 month), 6M (6 months), and 1Y (1 year). Set in the POST /api_post.php request body.
How do I retrieve the raw content of a paste?
Use POST /api_raw.php with the api_paste_key parameter set to the paste identifier. For public and unlisted pastes only your developer key is required. For private pastes you also need the api_user_key from a login session.
How do I create a paste through Jentic?
Search Jentic for 'create a Pastebin paste' to find the POST /api_post.php operation. Load the schema to see all parameters (api_paste_code, api_paste_format, api_paste_private, api_paste_expire_date), then execute. Install with pip install jentic.
Can I limit what my agent is allowed to do with the Pastebin API?
Yes. Because you run Jentic One yourself, your own rules decide which Pastebin operations the agent may call and which credentials it may use. You can allow only the operations the task needs, such as creating a paste via POST /api_post.php or fetching raw content via POST /api_raw.php, and leave out the POST /api_login.php authentication operation unless you explicitly add it. The developer key and any user session key stay under your control and are supplied at execution time, so the agent never sees them.
GET STARTED