{"id":867,"date":"2025-09-14T18:09:54","date_gmt":"2025-09-14T15:09:54","guid":{"rendered":"https:\/\/shareai.now\/?post_type=documentation&#038;p=867"},"modified":"2025-09-14T18:09:55","modified_gmt":"2025-09-14T15:09:55","slug":"getting-started-with-shareai-api","status":"publish","type":"documentation","link":"https:\/\/shareai.now\/docs\/api\/using-the-api\/getting-started-with-shareai-api\/","title":{"rendered":"Getting Started with ShareAI API"},"content":{"rendered":"\n<p>This guide provides quick-start instructions for using the ShareAI decentralized network API, helping you set up and make your first requests effectively.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Obtain Your API Key<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to the <a href=\"https:\/\/console.shareai.now\/app\/api-key\/\" target=\"_blank\" rel=\"noreferrer noopener\">ShareAI Console API Keys page<\/a>.<\/li>\n\n\n\n<li>Click <strong>Create New Key<\/strong>, enter a descriptive name, and securely save your API key. Remember, this key will only be shown once.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add User Credits<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Visit the <a href=\"https:\/\/console.shareai.now\/app\/billing\/\" target=\"_blank\" rel=\"noreferrer noopener\">Billing Page<\/a> to manage your balance and add credits.<\/li>\n\n\n\n<li>Credits enable interaction with AI models available across the network.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Make Your First API Call<\/h3>\n\n\n\n<p>Here&#8217;s how to structure a basic API request using the <strong>Chat Completions<\/strong> endpoint:<\/p>\n\n\n\n<p><strong>Endpoint URL:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>POST https:\/\/api.shareai.now\/api\/v1\/chat\/completions<br><\/code><\/pre>\n\n\n\n<p><strong>Request Headers:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Authorization: Bearer YOUR_API_KEY<br>Content-Type: application\/json<br><\/code><\/pre>\n\n\n\n<p><strong>Request Body Example<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>{\n  \"model\": \"deepseek-r1:32b\",\n  \"messages\": &#91;\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a highly perceptive sentiment analysis model. Respond with one word: Positive, Neutral, or Negative.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"ShareAI makes decentralized AI easy and accessible!\"\n    }\n  ]\n}<\/code><\/code><\/pre>\n\n\n\n<p>Replace <code>YOUR_API_KEY<\/code> with the actual key obtained from your console<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide provides quick-start instructions for using the ShareAI decentralized network API, helping you set up and make your first requests effectively. Step 1: Obtain Your API Key Step 2: Add User Credits Step 3: Make Your First API Call Here&#8217;s how to structure a basic API request using the Chat Completions endpoint: Endpoint URL: [&hellip;]<\/p>\n","protected":false},"featured_media":0,"template":"","docs-category":[31],"knowledge-base":[],"class_list":["post-867","documentation","type-documentation","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shareai.now\/api\/wp\/v2\/documentation\/867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shareai.now\/api\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/shareai.now\/api\/wp\/v2\/types\/documentation"}],"version-history":[{"count":2,"href":"https:\/\/shareai.now\/api\/wp\/v2\/documentation\/867\/revisions"}],"predecessor-version":[{"id":926,"href":"https:\/\/shareai.now\/api\/wp\/v2\/documentation\/867\/revisions\/926"}],"wp:attachment":[{"href":"https:\/\/shareai.now\/api\/wp\/v2\/media?parent=867"}],"wp:term":[{"taxonomy":"docs-category","embeddable":true,"href":"https:\/\/shareai.now\/api\/wp\/v2\/docs-category?post=867"},{"taxonomy":"knowledge-base","embeddable":true,"href":"https:\/\/shareai.now\/api\/wp\/v2\/knowledge-base?post=867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}