{"swagger":"2.0","info":{"title":"aimodel","description":"","version":"1"},"basePath":"/custom/rest/aimodel","schemes":["https"],"paths":{"/chat/completions":{"post":{"tags":["aimodel"],"description":"","operationId":"chatcompletions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"Request","in":"body","description":"","required":true,"schema":{"$ref":"#/definitions/CustomChatCompletions_Create_Request"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/Output"}}}}}},"definitions":{"ChoiceItem":{"description":"","type":"object","properties":{"index":{"type":"integer","example":1234567891234567,"format":"int64"},"message":{"$ref":"#/definitions/Message"},"finish_reason":{"type":"string","default":""}},"required":["Index"]},"Completion_tokens_detail":{"description":"","type":"object","properties":{"reasoning_tokens":{"type":"integer","example":1234567891234567,"format":"int64"},"accepted_prediction_tokens":{"type":"integer","example":1234567891234567,"format":"int64"},"rejected_prediction_tokens":{"type":"integer","example":1234567891234567,"format":"int64"}},"required":["Reasoning_tokens","Accepted_prediction_tokens","Rejected_prediction_tokens"]},"CustomChatCompletions_Create_Request":{"description":"","type":"object","properties":{"model":{"type":"string","default":""},"messages":{"type":"array","items":{"$ref":"#/definitions/messagesItem"},"description":"The messages to generate chat completions for, in the chat format.\n\nExample given: \n{\n "messages": [\n {"role": "<system | user | assistant>",\n "content": "<text>"\n }\n ]\n}\n"},"temperature":{"type":"number","example":0.1,"description":"A float to pass upstream as generation temperature setting."},"maxTokens":{"type":"integer","example":1234,"format":"int32","description":"The maximum number of tokens the model is allowed to generate. This means generation is cut at this point regardless of any notion of completeness."},"stop":{"type":"string","default":"","description":"List of sequences that will trigger generation stop"},"extraBody":{"type":"string","default":"","description":"JSON string that will be embedded into the upstream payload. This can be used to allow passing parameters unsupported by this service that the caller knows are supported by the upstream provider."},"extraHeaders":{"type":"string","default":"","description":"JSON object that will be embedded into the upstream request as headers. This can be used to allow passing configurations unsupported by this service that the caller knows are supported by the upstream provider."}},"required":["messages"]},"Message":{"description":"","type":"object","properties":{"role":{"type":"string","default":""},"content":{"type":"string","default":""}}},"messagesItem":{"description":"","type":"object","properties":{"role":{"type":"string","default":"","description":"The role of the author of this message."},"content":{"type":"string","default":"","description":"The contents of the message"}},"required":["role","content"]},"Output":{"description":"","type":"object","properties":{"id":{"type":"string","default":""},"object":{"type":"string","default":""},"created":{"type":"integer","example":1234567891234567,"format":"int64"},"model":{"type":"string","default":""},"choices":{"type":"array","items":{"$ref":"#/definitions/ChoiceItem"}},"usage":{"$ref":"#/definitions/Usage2"},"system_fingerprint":{"type":"string","default":""}},"required":["Usage"]},"Prompt_tokens_detail":{"description":"","type":"object","properties":{"cached_tokens":{"type":"integer","example":1234567891234567,"format":"int64"}}},"Usage2":{"description":"","type":"object","properties":{"prompt_tokens":{"type":"integer","example":1234567891234567,"format":"int64"},"completion_tokens":{"type":"integer","example":1234567891234567,"format":"int64"},"total_tokens":{"type":"integer","example":1234567891234567,"format":"int64"},"prompt_tokens_details":{"$ref":"#/definitions/Prompt_tokens_detail"},"completion_tokens_details":{"$ref":"#/definitions/Completion_tokens_detail"}},"required":["Completion_tokens_details"]}},"tags":[{"name":"aimodel"}]}