OpenAPI Specification
openapi: 3.0.1
info:
title: Targon Chat Search API
description: 'OpenAI-compatible REST API for Targon, the decentralized AI inference platform operated as Bittensor Subnet 4 by Manifold Labs. Inference is produced by a marketplace of miners running OpenAI-compliant endpoints and verified by validators. The public surface follows the OpenAI API shape: chat completions, legacy text completions, model listing, image generation, and search. All requests are authenticated with a Bearer API key.'
termsOfService: https://targon.com
contact:
name: Targon Support
url: https://docs.targon.com
version: '1.0'
servers:
- url: https://api.targon.com/v1
description: Targon OpenAI-compatible inference base URL.
security:
- bearerAuth: []
tags:
- name: Search
description: Query-based search/retrieval.
paths:
/search:
post:
operationId: createSearch
tags:
- Search
summary: Search
description: Returns relevant results for a query string, usable to ground model responses with retrieved context.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateSearchRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
components:
responses:
Unauthorized:
description: Missing or invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
RateLimited:
description: Too many requests.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
CreateSearchRequest:
type: object
required:
- query
properties:
query:
type: string
description: The search query.
max_results:
type: integer
default: 10
description: Maximum number of results to return.
SearchResponse:
type: object
properties:
query:
type: string
results:
type: array
items:
type: object
properties:
title:
type: string
url:
type: string
snippet:
type: string
score:
type: number
format: float
Error:
type: object
properties:
error:
type: object
properties:
message:
type: string
type:
type: string
code:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Targon API key passed as a Bearer token in the Authorization header: `Authorization: Bearer $TARGON_API_KEY`.'