API reference

Two public endpoints.

ReqRun v1 accepts OpenAI-style chat completions and exposes status lookup for requests that are still running.

Base URL and auth

  • Base URL: https://api.reqrun.com
  • Authentication: Bearer ReqRun project API key plus X-ReqRun-Timestamp, X-ReqRun-Nonce, and X-ReqRun-Signature
  • Request ids returned by ReqRun start with rr_
  • ReqRun project keys automatically scope requests to one project
  • Hosted keys also require the signing secret shown once when the key is created

Signature payload

For hosted keys, sign every request with HMAC SHA-256 using the signing secret returned when the key was created. The payload is the HTTP method, request path, SHA-256 hash of the exact request body string, timestamp (unix seconds), and nonce joined by newlines.

Signature payload
POST
/v1/chat/completions
sha256_hex_of_request_body
1746532800
5c12b3ef5f4142f5a6c4f6d615ab12de

POST /v1/chat/completions

Send the same non-streaming chat completion body you would send to OpenAI, authenticated with a ReqRun project API key.

  • Supported fields: model, messages, temperature, max_tokens, top_p, presence_penalty, frequency_penalty, wait, idempotency_key.
  • wait=false returns immediately after the request is queued.
  • wait=true returns the completed response if it finishes within the wait timeout, otherwise it falls back to the async shape.
  • stream=true is rejected in v1.
  • Authentication uses Bearer reqrun_live_ or reqrun_test_ API keys plus signed request headers.
HTTP
POST /v1/chat/completions
Host: api.reqrun.com
Authorization: Bearer REQRUN_LIVE_YOUR_PROJECT_KEY_HERE
X-ReqRun-Timestamp: 1746532800
X-ReqRun-Nonce: 5c12b3ef5f4142f5a6c4f6d615ab12de
X-ReqRun-Signature: v1=4b1c...
Content-Type: application/json

{
  "model": "gpt-5-nano",
  "messages": [{ "role": "user", "content": "Hello" }],
  "wait": true,
  "idempotency_key": "hello-001"
}

Async response

When a request is accepted but not completed yet, ReqRun returns a stable async shape. The id is a ReqRun request id, not an OpenAI chat completion id.

JSON
{
  "id": "rr_abc123",
  "object": "chat.completion.async",
  "status": "queued",
  "created": 1710000000
}

GET /v1/requests/{id}

Returns id, status, attempts, created_at, updated_at, last_error_code, and result when completed.

HTTP
GET /v1/requests/rr_abc123
Host: api.reqrun.com
Authorization: Bearer REQRUN_LIVE_YOUR_PROJECT_KEY_HERE
X-ReqRun-Timestamp: 1746532805
X-ReqRun-Nonce: 332d7d1e8a3b47b1a97dc8d0d6d9f7e2
X-ReqRun-Signature: v1=8c2f...
JSON
{
  "id": "rr_abc123",
  "status": "completed",
  "attempts": 2,
  "created_at": "2026-04-20T10:00:00Z",
  "updated_at": "2026-04-20T10:00:07Z",
  "last_error_code": null,
  "result": {
    "id": "chatcmpl_...",
    "object": "chat.completion"
  }
}

Error shape

Errors use one small response model across validation, authentication, unknown request ids, and internal failures.

JSON
{
  "error": {
    "message": "Invalid API key",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

Current product boundary

  • OpenAI-compatible, non-streaming chat completions only in v1
  • No stream=true support
  • No provider routing or workflow orchestration layer
  • No raw payload logging in standard application logs