Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Relace Code API

The Code API from Relace — 5 operation(s) for code.

Relace Code API is one of 2 APIs that Relace publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Code. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 5 operations across 5 paths, and defines 15 schemas. It is described by OpenAPI 3.0.1, at version 1.0.0.

Requests are made against 5 base URLs: https://compact.endpoint.relace.run, https://instantapply.endpoint.relace.run, https://ranker.endpoint.relace.run, https://embeddings.endpoint.relace.run, https://api.relace.run.

5 operations 5 paths 15 schemas 5 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.1
API Version
1.0.0
Base URL
https://api.relace.run
Authentication
HTTP Bearer
License
MIT
Resource Areas
1

Authentication & Security 1

Relace Code API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated.

  • bearerAuth — Relace API key Authorization header using the Bearer scheme.

Paths & Operations 5

Across 5 paths, the API surfaces 5 operations — 5 POST. Each is listed below with its method, path, parameters, and response codes.

Code 5
POST
/v1/code/compact
Compress an agent trace to only the important details.
body → 200400401404429500
POST
/v1/code/apply
Merge code snippets from an LLM into your existing codebase.
body → 200400401404429500
POST
/v1/code/rankdeprecated
List files in your codebase in order of relevance to a user's query.
body → 200400401404429500
POST
/v2/code/rank
Assess the relevance of each file in your codebase to a user's query.
body → 200400401404429500
POST
/v1/code/embed
Embed code snippets into a vector database for semantic search.
body → 200400401404429500

Schemas 15

The contract defines 15 schemas that model the data the API accepts and returns. The most detailed are InstantApplyRequest (6 properties), CodeRerankerRequest (4 properties), CompactRequest (3 properties), v1CodeEmbedderRequest (3 properties). Each schema is shown below with its type and property counts.

Error401
object
1 property
v1CodeEmbedderResponse
object
2 properties
CodeFile
object
2 properties 2 required
Error429
object
1 property
v2CodeRerankerResponse
object
2 properties
Error400
object
1 property
v1CodeRerankerResponse
array
Array of files ranked by relevance to the query
v1CodeEmbedderRequest
object
3 properties
CompactRequest
object
3 properties 1 required
CodeRerankerRequest
object
4 properties 3 required
InstantApplyRequest
object
6 properties 2 required
Error500
object
1 property
InstantApplyResponse
object
2 properties
CompactResponse
object
2 properties
Error404
object
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

relace-code-api-openapi.yml Raw ↑

Other APIs Relace publishes across the network.

Relace Repo API