OiOi

API Users

Pull your team's Contexts into any product surface.

Use Oi as the prompt source of truth for assistants, internal tools, jobs, and workflow automation.

Why developers care

No prompt strings in code

Fetch one shared Context instead of hardcoding prompts into product routes, workers, and tools.

One source of truth

Use the same context across assistants, internal tools, jobs, and product workflows.

Update without deploys

Change the Context in Oi and let clients pick up the latest version.

Public to private path

Start from public contexts, then use private org-specific versions through the same API shape.

Contexts

Context API

Get Context

Fetch one Context directly. Use the Context slug, for example `designer`.

# current version curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/contexts/:slug" # specific historical version curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/contexts/:slug?version=2"

List Contexts

Use limit and cursor for simple pagination. Start here when you want to see what your team has available.

# default fields include context and structuredData curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/contexts?limit=10" # optional: request the same default fields explicitly curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/contexts?limit=10&include=context,structured"

Context Request and Response Types

Use these language definitions as the query parameter and response shape reference. These GET endpoints do not accept JSON request bodies.

Did you know?

  • `context` is the compiled reusable Context prompt.
  • `structuredData` is the full Context object for UI, debugging, analytics, or custom client behavior.
type Guardrail = { name: string; slug: string; summary?: string; isPublic?: boolean; }; type Capability = { providerKey: string; capabilityKey: string; label: string; description?: string; privileges?: string[]; accessLevel?: "read" | "write" | "admin" | "unknown"; usageGuidance?: string; source: "built_in" | "discovered" | "custom"; status: "available" | "unavailable" | "requires_auth"; }; type ContextStructuredData = { version?: number; name: string; slug: string; description: string; personality: string; operatingStyle: string; scope?: string; decisionRules?: string[]; instructions: string; capabilities?: Capability[]; guardrails?: Guardrail[]; }; type ContextResponse = { context: string; structuredData: ContextStructuredData; usage?: { usageEventId: string; source: "api"; operation: "get_context"; promptTokenEstimate?: number; }; }; type ListContextsResponse = { items: ContextResponse[]; pagination: { page: number; pageSize: number; totalCount: number; totalPages: number; nextCursor?: string; hasNextPage: boolean; }; }; type ListContextsQueryParams = { cursor?: string; limit?: number; include?: "context" | "structured" | "context,structured"; }; type GetContextPathParams = { slug: string; }; type GetContextQueryParams = { version?: number; }; type GetContextResponse = ContextResponse;

Context Example Responses

Use these JSON payloads as concrete examples of Context API responses.

Get Context

{ // truncated for example "context": "## Scope\n\nFocus on UX quality, product flows, missing states, and interaction gaps...", "structuredData": { "version": 3, "name": "Designer", "slug": "designer", "description": "Reviews flows, UX details, and design direction.", "personality": "Direct, sharp, and product-minded.", "operatingStyle": "Give feedback in priority order with concrete fixes.", "scope": "Focus on UX quality, product flows, missing states, and interaction gaps.", "decisionRules": [ "Start with the most important friction or confusion.", "Call out missing states before visual polish.", "Be specific about the screen, component, or step." ], "instructions": "Act as the organization's design collaborator.", "capabilities": [ { "providerKey": "figma", "capabilityKey": "file.read", "label": "Read Figma files", "description": "Inspect Figma frames before giving design feedback.", "privileges": ["file.read"], "accessLevel": "read", "usageGuidance": "Use when a task references a Figma file or design review.", "source": "built_in", "status": "available" } ], "guardrails": [ { "name": "Warn before long prompt", "slug": "warn-before-long-prompt", "summary": "Warn the user before producing unusually long prompt content.", "isPublic": true } ] }, "usage": { "usageEventId": "usage_123", "source": "api", "operation": "get_context", "promptTokenEstimate": 620 } }

List Contexts

{ "items": [ { // truncated for example "context": "## Scope\n\nFocus on UX quality, product flows, missing states, and interaction gaps...", "structuredData": { "version": 3, "name": "Designer", "slug": "designer", "description": "Reviews flows, UX details, and design direction.", "personality": "Direct, sharp, and product-minded.", "operatingStyle": "Give feedback in priority order with concrete fixes.", "scope": "Focus on UX quality, product flows, missing states, and interaction gaps.", "decisionRules": [ "Start with the most important friction or confusion.", "Call out missing states before visual polish.", "Be specific about the screen, component, or step." ], "instructions": "Act as the organization's design collaborator.", "capabilities": [ { "providerKey": "figma", "capabilityKey": "file.read", "label": "Read Figma files", "description": "Inspect Figma frames before giving design feedback.", "privileges": ["file.read"], "accessLevel": "read", "usageGuidance": "Use when a task references a Figma file or design review.", "source": "built_in", "status": "available" } ], "guardrails": [ { "name": "Warn before long prompt", "slug": "warn-before-long-prompt", "summary": "Warn the user before producing unusually long prompt content.", "isPublic": true } ], } } ], "pagination": { "page": 1, "pageSize": 10, "totalCount": 24, "totalPages": 3, "nextCursor": "context#designer", "hasNextPage": true } }

Workflows

Workflow API

List Workflows

List organization Workflows for the API key's organization. Use `q`, `limit`, `page`, or `cursor` to search and paginate.

curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/workflows?limit=10"

Get Workflow

Fetch one organization Workflow by `workflowId`. Use `?version=2` to request a historical version.

curl -sS \ -H "Authorization: Bearer $OI_API_KEY" \ "https://api.oioioi.ai/v1/workflows/:workflowId"

Workflow Response Type

Organization Workflow responses follow the same top-level shape as Contexts: `context` plus `structuredData`. Use `/v1/workflows` with your organization API key.

type Guardrail = { name: string; slug: string; summary?: string; isPublic?: boolean; }; type Capability = { providerKey: string; capabilityKey: string; label: string; description?: string; privileges?: string[]; accessLevel?: "read" | "write" | "admin" | "unknown"; usageGuidance?: string; source: "built_in" | "discovered" | "custom"; status: "available" | "unavailable" | "requires_auth"; }; type Context = { slug: string; name: string; description: string; context?: string; personality: string; operatingStyle: string; scope?: string; decisionRules: string[]; instructions: string; capabilities?: Capability[]; guardrails: Guardrail[]; responsibility: string; handoffInstruction: string; required: boolean; order: number; }; type WorkflowStructuredData = { slug: string; organizationName?: string; organizationSlug?: string; organizationLogoUrl?: string; name: string; description: string; audience: string; bestFor: string; contextCount: number; installCount: number; publishedAt: string; invocationCommand: string; exampleUseCases: string[]; autoSelectEnabled: boolean; constraints: string; experiments: string; measurement: string; definitionOfDone: string; postExecutionFollowUp: string; contexts: Context[]; guardrails: Guardrail[]; }; type WorkflowResponse = { context: string; structuredData: WorkflowStructuredData; }; type PublicWorkflowSummary = { entityId: string; slug: string; organizationName?: string; organizationSlug?: string; organizationLogoUrl?: string; name: string; shortDescription: string; description: string; audience: string; bestFor: string; contextCount: number; installCount: number; publishedAt: string; invocationCommand: string; exampleUseCases: string[]; autoSelectEnabled: boolean; contexts: Array<{ name: string; responsibility: string; handoffInstruction: string; }>; guardrails: Guardrail[]; categories?: string[]; tags?: string[]; }; type PublicWorkflowDetailResponse = WorkflowResponse & { workflow: PublicWorkflowSummary; }; type ListWorkflowResponse = { items: WorkflowResponse[]; pagination: { page: number; pageSize: number; totalCount: number; totalPages: number; nextCursor?: string; hasNextPage: boolean; }; };

Workflow Example Responses

Guardrails appear inside the compiled Workflow `context` and the `structuredData` runtime details when present.

Get Workflow

{ // truncated for example "context": "# Launch Review\n\nRun a launch-readiness review...", "structuredData": { "slug": "launch-review", "organizationName": "Oi", "organizationSlug": "oi", "organizationLogoUrl": "https://oioioi.ai/og-image.png", "name": "Launch Review", "description": "Run a launch-readiness review across positioning, UX, technical risk, and follow-up actions.", "audience": "Product and growth teams", "bestFor": "Preparing a release or campaign before it reaches customers.", "contextCount": 3, "installCount": 42, "publishedAt": "2026-04-01T02:15:00.000Z", "invocationCommand": "oi workflow launch-review <your task here>", "exampleUseCases": [ "Review this launch plan and identify blockers.", "Turn this release brief into launch-ready tasks." ], "autoSelectEnabled": true, "constraints": "Keep recommendations grounded in the supplied brief and available evidence.", "experiments": "Suggest lightweight experiments when the launch risk is uncertain.", "measurement": "Track activation, support volume, conversion, and adoption.", "definitionOfDone": "Risks are named, owners are clear, and next actions are ready to assign.", "postExecutionFollowUp": "Review launch metrics and create a follow-up improvement list.", "contexts": [ { "slug": "product-manager", "name": "Product Manager", "responsibility": "Assess user value, launch scope, and tradeoffs.", "handoffInstruction": "Pass launch risks and open decisions to the next reviewer.", "required": true, "order": 0 }, { "slug": "designer", "name": "Designer", "description": "Use this Context when a product experience needs fast UX critique.", "context": "# Designer\n\nReview flows, UX details, and design direction.", "personality": "Direct, sharp, and product-minded.", "operatingStyle": "Give feedback in priority order with concrete fixes.", "scope": "Focus on UX quality, product flows, missing states, and interaction gaps.", "decisionRules": ["Start with the most important friction."], "instructions": "Act as the organization's design collaborator.", "capabilities": [ { "providerKey": "figma", "capabilityKey": "file.read", "label": "Read Figma files", "description": "Inspect Figma frames before giving design feedback.", "privileges": ["file.read"], "accessLevel": "read", "usageGuidance": "Use when a task references a Figma file or design review.", "source": "built_in", "status": "available" } ], "guardrails": [ { "name": "Warn before long prompt", "slug": "warn-before-long-prompt", "summary": "Warn the user before producing unusually long prompt content.", "isPublic": true } ], "responsibility": "Review UX quality and customer-facing flow.", "handoffInstruction": "Pass UX risks to engineering.", "required": true, "order": 1 } ], "guardrails": [ { "name": "Warn before long prompt", "slug": "warn-before-long-prompt", "summary": "Warn the user before producing unusually long prompt content.", "isPublic": true } ] }, "workflow": { "entityId": "workflow_123", "slug": "launch-review", "organizationName": "Oi", "organizationSlug": "oi", "organizationLogoUrl": "https://oioioi.ai/og-image.png", "name": "Launch Review", "shortDescription": "Run a launch-readiness review.", "description": "Run a launch-readiness review across positioning, UX, technical risk, and follow-up actions." } }

Get Workflows

{ "items": [ { // truncated for example "context": "# Launch Review\n\nRun a launch-readiness review...", "structuredData": { "slug": "launch-review", "name": "Launch Review", "description": "Run a launch-readiness review across positioning, UX, technical risk, and follow-up actions.", "organizationName": "Oi", "organizationSlug": "oi", "organizationLogoUrl": "https://oioioi.ai/og-image.png", "audience": "Product and growth teams", "bestFor": "Preparing a release or campaign before it reaches customers.", "contextCount": 3, "installCount": 42, "publishedAt": "2026-04-01T02:15:00.000Z", "invocationCommand": "oi workflow launch-review <your task here>", "exampleUseCases": [ "Review this launch plan and identify blockers.", "Turn this release brief into launch-ready tasks." ], "autoSelectEnabled": true, "constraints": "Keep recommendations grounded in the supplied brief and available evidence.", "experiments": "Suggest lightweight experiments when the launch risk is uncertain.", "measurement": "Track activation, support volume, conversion, and adoption.", "definitionOfDone": "Risks are named, owners are clear, and next actions are ready to assign.", "postExecutionFollowUp": "Review launch metrics and create a follow-up improvement list.", "contexts": [ { "slug": "product-manager", "name": "Product Manager", "responsibility": "Assess launch scope, risks, and tradeoffs.", "handoffInstruction": "Pass open launch decisions to design.", "required": true, "order": 0 }, { "slug": "designer", "name": "Designer", "responsibility": "Review UX quality and customer-facing flow.", "handoffInstruction": "Pass UX risks to engineering.", "required": true, "order": 1, "capabilities": [ { "providerKey": "figma", "capabilityKey": "file.read", "label": "Read Figma files", "description": "Inspect Figma frames before giving design feedback.", "privileges": ["file.read"], "accessLevel": "read", "usageGuidance": "Use when a task references a Figma file or design review.", "source": "built_in", "status": "available" } ] } ], "guardrails": [ { "name": "Warn before long prompt", "slug": "warn-before-long-prompt", "summary": "Warn the user before producing unusually long prompt content.", "isPublic": true } ] } } ], "pagination": { "page": 1, "pageSize": 10, "totalCount": 24, "totalPages": 3, "nextCursor": "workflow#launch-review", "hasNextPage": true } }

Errors

Error payloads use a small JSON shape that can be handled the same way across Context and Workflow endpoints.

{ "error": "entitlement_feature_unavailable(feature:api_access,plan:free,required:pro)", "feature": "api_access", "requiredPlan": "pro", "upgradePath": "/dashboard/organization/billing" }