Commit 8d869de8 authored by duanjinfei's avatar duanjinfei

update document

parent ca9f27f9
This diff is collapsed.
"use strict"; (self.webpackChunkdocusaurus_template_openapi_docs = self.webpackChunkdocusaurus_template_openapi_docs || []).push([[9333], { 52855: (t, e, a) => { a.r(e), a.d(e, { assets: () => d, contentTitle: () => r, default: () => k, frontMatter: () => i, metadata: () => s, toc: () => u }); var n = a(87462), o = (a(67294), a(3905)); const i = { id: "get_started", sidebar_position: 0 }, r = "Get Started", s = { unversionedId: "quick-start/get_started", id: "quick-start/get_started", title: "Get Started", description: "AON makes it easy to run machine learning models in the cloud from your own code.", source: "@site/docs/quick-start/get_started.md", sourceDirName: "quick-start", slug: "/quick-start/get_started", permalink: "/quick-start/get_started", draft: !1, tags: [], version: "current", sidebarPosition: 0, frontMatter: { id: "get_started", sidebar_position: 0 }, sidebar: "tutorialSidebar", previous: { title: "Quick Start", permalink: "/category/quick-start" }, next: { title: "Using AON with Node.js", permalink: "/quick-start/javascript_sdk" } }, d = {}, u = [{ value: "Get API Key And JWT Token", id: "get-api-key-and-jwt-token", level: 2 }, { value: "Usage", id: "usage", level: 2 }], l = { toc: u }; function k(t) { let { components: e, ...a } = t; return (0, o.kt)("wrapper", (0, n.Z)({}, l, a, { components: e, mdxType: "MDXLayout" }), (0, o.kt)("h1", { id: "get-started" }, "Get Started"), (0, o.kt)("p", null, "AON makes it easy to run machine learning models in the cloud from your own code."), (0, o.kt)("h2", { id: "get-api-key-and-jwt-token" }, "Get API Key And JWT Token"), (0, o.kt)("p", null, "Before using AON, we need to obtain an API Key or JWT Token for authentication in future API calls."), (0, o.kt)("p", null, "1\uff0cLogin from ", (0, o.kt)("a", { parentName: "p", href: "https://aigic.ai/" }, "AON home site"), " or ", (0, o.kt)("a", { parentName: "p", href: "https://console.aigic.ai/" }, "Dashboard")), (0, o.kt)("p", null, "2, If you are logged in from the AON home site, please navigate to the Dashboard."), (0, o.kt)("p", null, "3\uff0cYou can find the API Key from the list of API Keys."), (0, o.kt)("p", null, "4\uff0cYou can find the JWT Token from the list of JWT Tokens."), (0, o.kt)("p", null, "5\uff0cYou can choose either API key or JWT token for authentication."), (0, o.kt)("h2", { id: "usage" }, "Usage"), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "javascript_sdk" }, "Using AON with Node.js")), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "python_sdk" }, "Using AON with Python")), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "http" }, "Using AON with HTTP"))) } k.isMDXComponent = !0 } }]);
\ No newline at end of file
"use strict"; (self.webpackChunkdocusaurus_template_openapi_docs = self.webpackChunkdocusaurus_template_openapi_docs || []).push([[9333], { 52855: (t, e, a) => { a.r(e), a.d(e, { assets: () => d, contentTitle: () => r, default: () => k, frontMatter: () => i, metadata: () => s, toc: () => u }); var n = a(87462), o = (a(67294), a(3905)); const i = { id: "get_started", sidebar_position: 0 }, r = "Get Started", s = { unversionedId: "quick-start/get_started", id: "quick-start/get_started", title: "Get Started", description: "AON makes it easy to run machine learning models in the cloud from your own code.", source: "@site/docs/quick-start/get_started.md", sourceDirName: "quick-start", slug: "/quick-start/get_started", permalink: "/quick-start/get_started", draft: !1, tags: [], version: "current", sidebarPosition: 0, frontMatter: { id: "get_started", sidebar_position: 0 }, sidebar: "tutorialSidebar", previous: { title: "Quick Start", permalink: "/category/quick-start" }, next: { title: "Using AON with Node.js", permalink: "/quick-start/javascript_sdk" } }, d = {}, u = [{ value: "Get API Key And JWT Token", id: "get-api-key-and-jwt-token", level: 2 }, { value: "Usage", id: "usage", level: 2 }], l = { toc: u }; function k(t) { let { components: e, ...a } = t; return (0, o.kt)("wrapper", (0, n.Z)({}, l, a, { components: e, mdxType: "MDXLayout" }), (0, o.kt)("h1", { id: "get-started" }, "Get Started"), (0, o.kt)("p", null, "AON makes it easy to run machine learning models in the cloud from your own code."), (0, o.kt)("h2", { id: "get-api-key-and-jwt-token" }, "Get API Key And JWT Token"), (0, o.kt)("p", null, "Before using AON, we need to obtain an API Key or JWT Token for authentication in future API calls."), (0, o.kt)("p", null, "1\uff0cLogin from ", (0, o.kt)("a", { parentName: "p", href: "https://aonet.ai/" }, "AON home site"), " or ", (0, o.kt)("a", { parentName: "p", href: "https://console.aonet.ai/" }, "Dashboard")), (0, o.kt)("p", null, "2, If you are logged in from the AON home site, please navigate to the Dashboard."), (0, o.kt)("p", null, "3\uff0cYou can find the API Key from the list of API Keys."), (0, o.kt)("p", null, "4\uff0cYou can find the JWT Token from the list of JWT Tokens."), (0, o.kt)("p", null, "5\uff0cYou can choose either API key or JWT token for authentication."), (0, o.kt)("h2", { id: "usage" }, "Usage"), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "javascript_sdk" }, "Using AON with Node.js")), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "python_sdk" }, "Using AON with Python")), (0, o.kt)("p", null, (0, o.kt)("a", { parentName: "p", href: "http" }, "Using AON with HTTP"))) } k.isMDXComponent = !0 } }]);
\ No newline at end of file
This diff is collapsed.
"use strict"; (self.webpackChunkdocusaurus_template_openapi_docs = self.webpackChunkdocusaurus_template_openapi_docs || []).push([[8818], { 57461: (t, e, a) => { a.r(e), a.d(e, { assets: () => l, contentTitle: () => r, default: () => c, frontMatter: () => o, metadata: () => s, toc: () => p }); var i = a(87462), n = (a(67294), a(3905)); const o = { id: "http", sidebar_position: 3 }, r = "Using AON with HTTP", s = { unversionedId: "quick-start/http", id: "quick-start/http", title: "Using AON with HTTP", description: "Authentication", source: "@site/docs/quick-start/http.md", sourceDirName: "quick-start", slug: "/quick-start/http", permalink: "/quick-start/http", draft: !1, tags: [], version: "current", sidebarPosition: 3, frontMatter: { id: "http", sidebar_position: 3 }, sidebar: "tutorialSidebar", previous: { title: "Using AON with Python", permalink: "/quick-start/python_sdk" }, next: { title: "Public Models API", permalink: "/category/public-models-api" } }, l = {}, p = [{ value: "Authentication", id: "authentication", level: 2 }, { value: "For API Key", id: "for-api-key", level: 3 }, { value: "For JWT Token", id: "for-jwt-token", level: 3 }, { value: "Create a prediction", id: "create-a-prediction", level: 2 }, { value: "For API Key", id: "for-api-key-1", level: 3 }, { value: "For JWT Token", id: "for-jwt-token-1", level: 3 }], u = { toc: p }; function c(t) { let { components: e, ...a } = t; return (0, n.kt)("wrapper", (0, i.Z)({}, u, a, { components: e, mdxType: "MDXLayout" }), (0, n.kt)("h1", { id: "using-aigic-with-http" }, "Using AON with HTTP"), (0, n.kt)("h2", { id: "authentication" }, "Authentication"), (0, n.kt)("p", null, "All API requests must be authenticated. Include authenticated in header with all requests."), (0, n.kt)("p", null, "You can choose either API key or JWT token for authentication."), (0, n.kt)("h3", { id: "for-api-key" }, "For API Key"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, 'header = {\n apikey:"your api key"\n}\n')), (0, n.kt)("h3", { id: "for-jwt-token" }, "For JWT Token"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, 'header = {\n Authorization:"Bearer your jwt token"\n}\n')), (0, n.kt)("h2", { id: "create-a-prediction" }, "Create a prediction"), (0, n.kt)("h3", { id: "for-api-key-1" }, "For API Key"), (0, n.kt)("p", null, "When using API key for authentication, the base path of the HTTP request is 'api'."), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, "POST https://api.aigic.ai/api/v1/predictions/ai/bark\n")), (0, n.kt)("p", null, "Example cURL request:"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-javascript" }, "curl -X POST \\\n https://api.aigic.ai/api/v1/predictions/ai/bark \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json' \\\n -H 'apikey: <your api key>' \\\n -d '{\n \"input\":{\n \"prompt\": \"Hello, my name is Suno. And, uh \u2014 and I like pizza. [laughs] But I also have other interests such as playing tic tac toe.\"\n }\n}'\n")), (0, n.kt)("h3", { id: "for-jwt-token-1" }, "For JWT Token"), (0, n.kt)("p", null, "When using JWT Tokwn for authentication, the base path of the HTTP request is 'jwt'."), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, "POST https://api.aigic.ai/jwt/v1/predictions/ai/bark\n")), (0, n.kt)("p", null, "Example cURL request:"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-javascript" }, "curl -X POST \\\n https://api.aigic.ai/jwt/v1/predictions/ai/bark \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer <your jwt token>' \\\n -d '{\n \"input\":{\n \"prompt\": \"Hello, my name is Suno. And, uh \u2014 and I like pizza. [laughs] But I also have other interests such as playing tic tac toe.\"\n }\n}'\n"))) } c.isMDXComponent = !0 } }]);
\ No newline at end of file
"use strict"; (self.webpackChunkdocusaurus_template_openapi_docs = self.webpackChunkdocusaurus_template_openapi_docs || []).push([[8818], { 57461: (t, e, a) => { a.r(e), a.d(e, { assets: () => l, contentTitle: () => r, default: () => c, frontMatter: () => o, metadata: () => s, toc: () => p }); var i = a(87462), n = (a(67294), a(3905)); const o = { id: "http", sidebar_position: 3 }, r = "Using AON with HTTP", s = { unversionedId: "quick-start/http", id: "quick-start/http", title: "Using AON with HTTP", description: "Authentication", source: "@site/docs/quick-start/http.md", sourceDirName: "quick-start", slug: "/quick-start/http", permalink: "/quick-start/http", draft: !1, tags: [], version: "current", sidebarPosition: 3, frontMatter: { id: "http", sidebar_position: 3 }, sidebar: "tutorialSidebar", previous: { title: "Using AON with Python", permalink: "/quick-start/python_sdk" }, next: { title: "Public Models API", permalink: "/category/public-models-api" } }, l = {}, p = [{ value: "Authentication", id: "authentication", level: 2 }, { value: "For API Key", id: "for-api-key", level: 3 }, { value: "For JWT Token", id: "for-jwt-token", level: 3 }, { value: "Create a prediction", id: "create-a-prediction", level: 2 }, { value: "For API Key", id: "for-api-key-1", level: 3 }, { value: "For JWT Token", id: "for-jwt-token-1", level: 3 }], u = { toc: p }; function c(t) { let { components: e, ...a } = t; return (0, n.kt)("wrapper", (0, i.Z)({}, u, a, { components: e, mdxType: "MDXLayout" }), (0, n.kt)("h1", { id: "using-aigic-with-http" }, "Using AON with HTTP"), (0, n.kt)("h2", { id: "authentication" }, "Authentication"), (0, n.kt)("p", null, "All API requests must be authenticated. Include authenticated in header with all requests."), (0, n.kt)("p", null, "You can choose either API key or JWT token for authentication."), (0, n.kt)("h3", { id: "for-api-key" }, "For API Key"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, 'header = {\n apikey:"your api key"\n}\n')), (0, n.kt)("h3", { id: "for-jwt-token" }, "For JWT Token"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, 'header = {\n Authorization:"Bearer your jwt token"\n}\n')), (0, n.kt)("h2", { id: "create-a-prediction" }, "Create a prediction"), (0, n.kt)("h3", { id: "for-api-key-1" }, "For API Key"), (0, n.kt)("p", null, "When using API key for authentication, the base path of the HTTP request is 'api'."), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, "POST https://api.aonet.ai/api/v1/predictions/ai/bark\n")), (0, n.kt)("p", null, "Example cURL request:"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-javascript" }, "curl -X POST \\\n https://api.aonet.ai/api/v1/predictions/ai/bark \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json' \\\n -H 'apikey: <your api key>' \\\n -d '{\n \"input\":{\n \"prompt\": \"Hello, my name is Suno. And, uh \u2014 and I like pizza. [laughs] But I also have other interests such as playing tic tac toe.\"\n }\n}'\n")), (0, n.kt)("h3", { id: "for-jwt-token-1" }, "For JWT Token"), (0, n.kt)("p", null, "When using JWT Tokwn for authentication, the base path of the HTTP request is 'jwt'."), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-shell" }, "POST https://api.aonet.ai/jwt/v1/predictions/ai/bark\n")), (0, n.kt)("p", null, "Example cURL request:"), (0, n.kt)("pre", null, (0, n.kt)("code", { parentName: "pre", className: "language-javascript" }, "curl -X POST \\\n https://api.aonet.ai/jwt/v1/predictions/ai/bark \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/json' \\\n -H 'Authorization: Bearer <your jwt token>' \\\n -d '{\n \"input\":{\n \"prompt\": \"Hello, my name is Suno. And, uh \u2014 and I like pizza. [laughs] But I also have other interests such as playing tic tac toe.\"\n }\n}'\n"))) } c.isMDXComponent = !0 } }]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment