Skip to content

Commit 10bb04f

Browse files
feat: remove HTTP autoexample from billing-balance.json, move it into /api-references/service-endpoints
1 parent 03dec06 commit 10bb04f

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

docs/service-endpoints/billing-balance.json renamed to docs/api-references/service-endpoints/billing-balance.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,17 @@
8484
},
8585
"x-hideTryItPanel": false,
8686
"x-codeSamples": [
87+
{
88+
"lang": "cURL",
89+
"source": "curl -L \\\n --request GET \\\n --url 'https://api.aimlapi.com/v1/billing/balance' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json'"
90+
},
8791
{
8892
"lang": "JavaScript",
8993
"source": "async function main() {\n const response = await fetch(\"https://api.aimlapi.com/v1/billing/balance\", {\n headers: {\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n \"Content-Type\": \"application/json\",\n },\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
9094
},
9195
{
9296
"lang": "Python",
9397
"source": "import requests\nimport json\n\ndef main():\n response = requests.get(\n \"https://api.aimlapi.com/v1/billing/balance\",\n headers={\n # Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n \"Content-Type\": \"application/json\",\n }\n )\n\n data = response.json()\n print(json.dumps(data, indent=2, ensure_ascii=False))\n\nif __name__ == \"__main__\":\n main()"
94-
},
95-
{
96-
"lang": "cURL",
97-
"source": "curl -L \\\n --request GET \\\n --url 'https://api.aimlapi.com/v1/billing/balance' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json'"
98-
},
99-
{
100-
"lang": "HTTP",
101-
"source": "GET /v1/billing/balance HTTP/1.1\nHost: api.aimlapi.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nAccept: */*"
10298
}
10399
]
104100
}

0 commit comments

Comments
 (0)