modified_magicapi-coder.json•5.84 kB
{
"openapi": "3.0.0",
"info": {
"title": "Image Processing API",
"version": "1.1.3",
"description": "API for code generation using AI models."
},
"servers": [
{
"url": "http://api.magicapi.dev/api/v1/magicapi/coder"
}
],
"paths": {
"magicapi/coder/predictions/{request_id}": {
"get": {
"summary": "Get coder output URL",
"description": "This endpoint retrieves the URL of the coding assistant's response for a given request ID.\n",
"parameters": [
{
"name": "request_id",
"in": "path",
"required": true,
"description": "Unique identifier for the request.",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "Status of the prediction (e.g., \"succeeded\")."
},
"response_url": {
"type": "string",
"format": "uri",
"description": "URL of the response."
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Description of the error."
}
}
}
}
}
}
},
"security": [
{
"apiKey": []
}
]
},
"parameters": [
{
"description": "API.market API Key",
"in": "header",
"name": "x-magicapi-key",
"value": "clp7flnx6000j3pifm3pinw92",
"required": true,
"schema": {
"type": "string"
}
}
]
},
"magicapi/coder/coder": {
"post": {
"summary": "Coding Assistant",
"description": "Coding Assistant. \n Make sure you call get coder output URL MCP tool to get the URL for the request id received from this API ",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"top_k": {
"type": "integer",
"default": 250
},
"top_p": {
"type": "integer",
"default": 0.95
},
"prompt": {
"type": "string",
"default": "Write a javascript function that calculates euclidean distance between two coordinates of any dimension"
},
"max_tokens": {
"type": "integer",
"default": 500
},
"temperature": {
"type": "integer",
"default": 0.95
},
"system_prompt": {
"type": "string"
},
"repeat_penalty": {
"type": "integer",
"default": 1.1
},
"presence_penalty": {
"type": "integer",
"default": 0
},
"frequency_penalty": {
"type": "integer",
"default": 0
}
},
"required": [
"top_k",
"top_p",
"prompt",
"max_tokens",
"temperature",
"system_prompt",
"repeat_penalty",
"presence_penalty",
"frequency_penalty"
]
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"request_id": {
"type": "string",
"description": "Unique identifier for the request."
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Description of the error."
}
}
}
}
}
}
},
"security": [
{
"apiKey": []
}
]
},
"parameters": [
{
"description": "API.market API Key",
"in": "header",
"name": "x-magicapi-key",
"value": "clp7flnx6000j3pifm3pinw92",
"required": true,
"schema": {
"type": "string"
}
}
]
}
},
"security": {},
"tags": []
}