canonical: https://jentic.com/apis/runtime.dev/runtime-dev

# Runtime Code Detection API

Detect, label, format and enrich code in your app or data pipeline. The Code Detection API can identify whether content is code or text, detect the programming language, and format/enrich code snippets. The API exposes 6 endpoints secured with oauth2 authentication.

## For AI agents

Programmatically detect if content is code, detect code in multiple content items. Covers 6 operations with oauth2 authentication.

## Scope

Does not handle payments, communications, or developer tools - use for crm only.

## Capabilities

- Detect if content is code
- Label code with language and metadata
- Format a code snippet
- Enrich a code snippet with metadata
- List supported programming languages

## Use cases

### CRM Operations

Use the Code Detection API to perform crm operations programmatically. The API provides 6 endpoints covering core functionality including detect if content is code, detect code in multiple content items, label code with language and metadata.

Example prompt: Call POST /detect to detect if content is code

### Automated Detection Management

Automate detection operations by combining multiple Code Detection API endpoints. Agents can detect code in multiple content items and then label code with language and metadata in a single workflow.

Example prompt: Call POST `/detect/batch` to detect code in multiple content items, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Code Detection API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle oauth2 tokens manually.

Example prompt: Search Jentic for 'detect if content is code', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/detect` | Detect if content is code |
| POST | `/detect/batch` | Detect code in multiple content items |
| POST | `/label` | Label code with language and metadata |
| POST | `/format` | Format a code snippet |
| POST | `/enrich` | Enrich a code snippet with metadata |
| GET | `/languages` | List supported programming languages |

## Key resources

- **Detection** — Detect whether content is code and identify the language
- **Formatting** — Format and enrich code snippets
- **Analysis** — Analyze code content

## Why Jentic

- **Setup:** Wiring the Code Detection API by hand means running its OAuth2 flow, refreshing tokens, and posting each payload to api.runtime.dev yourself. Through Jentic you install once, import the Code Detection API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** The Code Detection API takes its target in the request body rather than the URL path, so scope the agent to the operations it needs, such as detecting code or labeling content, and leave out batch detection or enrichment unless the agent needs them.
- **Credential handling:** Your Code Detection API credential 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 'detect if content is code' or 'format a code snippet', and Jentic returns the matching Code Detection API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Hubspot** — Alternative crm API
- **Salesforce** — Alternative crm API
- **Pipedrive** — Complementary crm API
- **Zoho** — Complementary crm API

## FAQ

### What authentication does the Code Detection API use?

The Code Detection API uses OAuth 2.0 for authorization. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I detect if content is code with the Code Detection API?

Yes. Use the POST /detect endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Code Detection API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I detect if content is code through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'detect if content is code'. Jentic returns the matching Code Detection API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Code Detection API have?

The Code Detection API exposes 6 endpoints covering detection, formatting, analysis operations.

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

Yes. Because you run Jentic One yourself, your own rules decide which Code Detection API operations and credential the agent may use. Since this API takes its target in the request body rather than the URL path, you scope the agent to only the operations it needs, such as POST /detect to check content or POST /label to tag it, and leave out POST `/detect/batch` and POST /enrich unless the agent actually requires them.
