Skip to content

Commit 08fc02e

Browse files
feat: add keys-delete api schema
1 parent 4ec6f24 commit 08fc02e

2 files changed

Lines changed: 276 additions & 0 deletions

File tree

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"title": "AIML API",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.aimlapi.com"
10+
}
11+
],
12+
"paths": {
13+
"/keys": {
14+
"delete": {
15+
"operationId": "KeysController_postKeys_v1",
16+
"parameters": [
17+
{
18+
"name": "prefix",
19+
"in": "path",
20+
"required": true,
21+
"description": "Key prefix to delete. Passed in the URL path.",
22+
"schema": {
23+
"type": "string",
24+
"example": "19e32b2c"
25+
}
26+
}
27+
],
28+
"responses": {
29+
"200": {
30+
"description": "Key deletion result.",
31+
"content": {
32+
"application/json": {
33+
"schema": {
34+
"type": "object",
35+
"properties": {
36+
"data": {
37+
"type": "object",
38+
"properties": {
39+
"prefix": {
40+
"type": "string",
41+
"description": "Deleted key prefix.",
42+
"example": "19e32b2c"
43+
},
44+
"deleted": {
45+
"type": "boolean",
46+
"description": "Indicates whether the key was successfully deleted.",
47+
"example": true
48+
}
49+
},
50+
"required": [
51+
"prefix",
52+
"deleted"
53+
]
54+
}
55+
},
56+
"required": [
57+
"data"
58+
]
59+
}
60+
}
61+
}
62+
}
63+
},
64+
"x-hideTryItPanel": false,
65+
"x-codeSamples": [
66+
{
67+
"lang": "cURL",
68+
"source": "curl -L \\\n --request DELETE \\\n --url 'https://api.aimlapi.com/v1/keys/19e32b2c' \\\n --header 'Authorization: Bearer <YOUR_MANAGEMENT_KEY>'"
69+
},
70+
{
71+
"lang": "JavaScript",
72+
"source": "async function main() {\n const response = await fetch(\"https://api.aimlapi.com/v1/keys/19e32b2c\", {\n method: \"DELETE\",\n headers: {\n \"Authorization\": \"Bearer <YOUR_MANAGEMENT_KEY>\"\n }\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
73+
},
74+
{
75+
"lang": "Python",
76+
"source": "import requests\nimport json\n\n\ndef main():\n url = \"https://api.aimlapi.com/v1/keys/19e32b2c\"\n headers = {\n \"Authorization\": \"Bearer <YOUR_MANAGEMENT_KEY>\"\n }\n\n response = requests.delete(url, headers=headers)\n data = response.json()\n print(json.dumps(data, indent=2, ensure_ascii=False))\n\n\nif __name__ == \"__main__\":\n main()"
77+
}
78+
]
79+
}
80+
}
81+
}
82+
}
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"title": "AIML API",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.aimlapi.com"
10+
}
11+
],
12+
"paths": {
13+
"/keys": {
14+
"get": {
15+
"operationId": "KeysController_getKeys_v1",
16+
"requestBody": {
17+
"required": true,
18+
"content": {
19+
"application/json": {
20+
"schema": {
21+
"type": "object",
22+
"properties": {
23+
"model": {
24+
"type": "string",
25+
"enum": [
26+
"alibaba/qwen-image-edit"
27+
]
28+
},
29+
"prompt": {
30+
"type": "string",
31+
"maxLength": 800,
32+
"description": "The text prompt describing the content, style, or composition of the image to be generated."
33+
},
34+
"image": {
35+
"type": "string",
36+
"description": "The image to be edited. Enter the Base64 encoding of the picture or an accessible URL. Image URL: Make sure that the image URL is accessible. Base64-encoded content: The format must be in lowercase."
37+
},
38+
"negative_prompt": {
39+
"type": "string",
40+
"maxLength": 500,
41+
"description": "The description of elements to avoid in the generated image."
42+
},
43+
"watermark": {
44+
"type": "boolean",
45+
"default": false,
46+
"description": "Add an invisible watermark to the generated images."
47+
}
48+
},
49+
"required": [
50+
"model",
51+
"prompt",
52+
"image"
53+
],
54+
"title": "alibaba/qwen-image-edit"
55+
}
56+
}
57+
}
58+
},
59+
"responses": {
60+
"200": {
61+
"description": "A list of available models.",
62+
"content": {
63+
"application/json": {
64+
"schema": {
65+
"type": "array",
66+
"items": {
67+
"type": "object",
68+
"properties": {
69+
"id": {
70+
"type": "string",
71+
"description": "Unique identifier of the model.",
72+
"example": "o3-mini"
73+
},
74+
"type": {
75+
"type": "string",
76+
"description": "Model interaction type.",
77+
"example": "chat-completion"
78+
},
79+
"info": {
80+
"type": "object",
81+
"description": "Metadata describing the model.",
82+
"properties": {
83+
"name": {
84+
"type": "string",
85+
"description": "Human-readable model name.",
86+
"example": "o3 mini"
87+
},
88+
"developer": {
89+
"type": "string",
90+
"description": "Organization or company that developed the model.",
91+
"example": "Open AI"
92+
},
93+
"description": {
94+
"type": "string",
95+
"description": "Short description of the model and its primary capabilities.",
96+
"example": "OpenAI o3-mini excels in reasoning tasks with advanced features like deliberative alignment and extensive context support."
97+
},
98+
"contextLength": {
99+
"type": "integer",
100+
"description": "Maximum supported context window size in tokens.",
101+
"example": 200000
102+
},
103+
"maxTokens": {
104+
"type": "integer",
105+
"description": "Maximum number of tokens that can be generated in a single response.",
106+
"example": 100000
107+
},
108+
"url": {
109+
"type": "string",
110+
"format": "uri",
111+
"description": "Public model landing page on AIML API website.",
112+
"example": "https://aimlapi.com/models/openai-o3-mini-api"
113+
},
114+
"docs_url": {
115+
"type": "string",
116+
"format": "uri",
117+
"description": "Link to the official API documentation for this model.",
118+
"example": "https://docs.aimlapi.com/api-references/text-models-llm/openai/o3-mini"
119+
}
120+
},
121+
"required": [
122+
"name",
123+
"developer",
124+
"description",
125+
"url",
126+
"docs_url"
127+
]
128+
},
129+
"features": {
130+
"type": "array",
131+
"description": "List of supported features and API capabilities for the model.",
132+
"items": {
133+
"type": "string"
134+
},
135+
"example": [
136+
"openai/chat-completion",
137+
"openai/response-api",
138+
"openai/chat-assistant",
139+
"openai/chat-completion.function",
140+
"openai/chat-completion.message.refusal",
141+
"openai/chat-completion.message.system",
142+
"openai/chat-completion.message.developer",
143+
"openai/chat-completion.message.assistant",
144+
"openai/chat-completion.stream",
145+
"openai/chat-completion.max-completion-tokens",
146+
"openai/chat-completion.seed",
147+
"openai/chat-completion.reasoning",
148+
"openai/chat-completion.response-format"
149+
]
150+
},
151+
"endpoints": {
152+
"type": "array",
153+
"description": "API endpoints through which this model can be accessed.",
154+
"items": {
155+
"type": "string"
156+
},
157+
"example": [
158+
"/v1/chat/completions",
159+
"/v1/responses"
160+
]
161+
}
162+
},
163+
"required": [
164+
"id",
165+
"type",
166+
"info",
167+
"features",
168+
"endpoints"
169+
]
170+
}
171+
}
172+
}
173+
}
174+
}
175+
},
176+
"x-hideTryItPanel": false,
177+
"x-codeSamples": [
178+
{
179+
"lang": "cURL",
180+
"source": "curl -L \\\n --url 'https://api.aimlapi.com/models'"
181+
},
182+
{
183+
"lang": "JavaScript",
184+
"source": "async function main() {\n const response = await fetch(\"https://api.aimlapi.com/models\");\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
185+
},
186+
{
187+
"lang": "Python",
188+
"source": "import requests\nimport json\n\ndef main():\n response = requests.get(\"https://api.aimlapi.com/models\")\n data = response.json()\n print(json.dumps(data, indent=2, ensure_ascii=False))\n\nif __name__ == \"__main__\":\n main()"
189+
}
190+
]
191+
}
192+
}
193+
}
194+
}

0 commit comments

Comments
 (0)