@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Pinecone Inference API
@base https://api.pinecone.io
@version 2026-04
@auth ApiKey Api-Key in header
@endpoints 4
@toc embed(1), rerank(1), models(2)

@group embed
@endpoint POST /embed
@required {X-Pinecone-Api-Version: str=2026-04, model: str, inputs: [map{text: str}]}
@optional {parameters: map}
@returns(200) {model: str, vector_type: str, data: [map], usage: map{total_tokens: int(int32)}}
@errors {400, 401, 500}

@endgroup

@group rerank
@endpoint POST /rerank
@required {X-Pinecone-Api-Version: str=2026-04, model: str, query: str, documents: [map]}
@optional {top_n: int, return_documents: bool=True, rank_fields: [str]=['text'], parameters: map}
@returns(200) {model: str, data: [map], usage: map{rerank_units: int(int32)}}
@errors {400, 401, 500}

@endgroup

@group models
@endpoint GET /models
@required {X-Pinecone-Api-Version: str=2026-04}
@optional {type: str, vector_type: str}
@returns(200) {models: [map]}
@errors {401, 404, 500}

@endpoint GET /models/{model_name}
@required {X-Pinecone-Api-Version: str=2026-04, model_name: str}
@returns(200) {model: str, short_description: str, type: str, vector_type: str, default_dimension: int(int32), modality: str, max_sequence_length: int(int32), max_batch_size: int(int32), provider_name: str, supported_dimensions: [int(int32)], supported_metrics: [str], supported_parameters: [map]}
@errors {401, 404, 500}

@endgroup

@end
