---
title: "run.job-stream-ticket-result@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/run.job-stream-ticket-result"
updated: null
---

# run.job-stream-ticket-result@1 · OpenVibe.Services

HTML: [run.job-stream-ticket-result@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/run.job-stream-ticket-result)

# RunJobStreamTicketResult `run.job-stream-ticket-result@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: run
- Visibility: public
- Status: planned
- Compatibility: backward
- Decision: [ADR-034](/docs/adr/ADR-034)
- Schema: [`https://openvibe.network/contracts/run/job-stream-ticket-result.v1.json`](/docs/contracts/run.job-stream-ticket-result.json)

run.job-stream-ticket-result@1 (PLANNED; plan T14 R1): the answer of POST /api/v1/jobs/{id}/stream/ticket on OpenVibe.Run (capability run.job.stream), modelled on Events' realtime ticket (network.realtime-ticket-result@1). A browser cannot put a header on an EventSource, so it opens \`${stream\_url}?ticket=${ticket}\` (plus Last-Event-ID when it resumes) at once. The ticket is a two-minute RS256 JWT that Run signs: audience openvibe.run, typ run-stream (so it is never a session token), it names this one job, and Run refuses a jti it has already seen while the ticket is valid, so a ticket opens one stream; ask for a fresh one for every reconnect. Never logged, never stored. A server caller may instead send its Bearer token to GET /api/v1/jobs/{id}/stream. The stream is text/event-stream of run.job-stream-event@1.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `ticket` | string | yes | The signed ticket (a compact JWS). | - `pattern ^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$`<br>- `maxLength 4096` |
| `expires_at` | string | yes |  | - `format date-time` |
| `expires_in` | integer | yes | Seconds until the ticket expires (120). | - `minimum 1`<br>- `maximum 300` |
| `stream_url` | string | yes |  | - `pattern ^https?://[^?#]+/api/v1/jobs/job_[0-9A-HJKMNP-TV-Z]{26}/stream$`<br>- `format uri` |
| `job_id` | string | yes |  | - `pattern ^job_[0-9A-HJKMNP-TV-Z]{26}$` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: ticket

~~~~
{
  "ticket": "sample-ticket.not-a-jwt.placeholder",
  "expires_at": "2026-10-04T10:02:00.000Z",
  "expires_in": 120,
  "stream_url": "https://openvibe.run/api/v1/jobs/job_01JAB2C3D4E5F6G7H8J9K0MNPQ/stream",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Rejected: long-lived

~~~~
{
  "ticket": "sample-ticket.not-a-jwt.placeholder",
  "expires_at": "2026-10-04T10:02:00.000Z",
  "expires_in": 3600,
  "stream_url": "https://openvibe.run/api/v1/jobs/job_01JAB2C3D4E5F6G7H8J9K0MNPQ/stream",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

Rejected: other-stream-url

~~~~
{
  "ticket": "sample-ticket.not-a-jwt.placeholder",
  "expires_at": "2026-10-04T10:02:00.000Z",
  "expires_in": 120,
  "stream_url": "https://openvibe.run/api/v1/jobs",
  "job_id": "job_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('run.job-stream-ticket-result@1', value);   // { valid, errors: [{ path, message }] }
~~~~
