@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api GroqCloud API Swagger
@base https://api.groq.com
@version 2.0
@auth Bearer bearer
@endpoints 7
@toc openai(7)

@endpoint POST /openai/v1/audio/transcriptions
@returns(200) {text: str}

@endpoint POST /openai/v1/audio/translations
@returns(200) {text: str}

@endpoint POST /openai/v1/chat/completions
@required {messages: [any], model: any}
@optional {frequency_penalty: num=0, function_call: any, functions: [map{description: str, name!: str, parameters: map}], logit_bias: map=null, logprobs: bool=false, max_tokens: int, n: int=1, parallel_tool_calls: bool=true, presence_penalty: num=0, response_format: map{type: str}, seed: int, stop: any=null, stream: bool=false, temperature: num=1, tool_choice: any, tools: [map{function!: map, type!: str}], top_logprobs: int, top_p: num=1, user: str}
@returns(200) {choices: [map], created: int, id: str, model: str, object: str, system_fingerprint: str, usage: map{completion_time: num, completion_tokens: int, prompt_time: num, prompt_tokens: int, queue_time: num, total_time: num, total_tokens: int}}

@endpoint POST /openai/v1/embeddings
@required {input: any, model: any}
@optional {encoding_format: str(float/base64)=float, user: str}
@returns(200) {data: [map], model: str, object: str, usage: map{prompt_tokens: int, total_tokens: int}}

@endpoint GET /openai/v1/models
@returns(200) {data: [any], object: str}

@endpoint DELETE /openai/v1/models/{model}
@required {model: str}
@returns(200) {deleted: bool, id: str, object: str}

@endpoint GET /openai/v1/models/{model}
@required {model: str}
@returns(200) {created: int, id: str, object: str, owned_by: str}

@end
