Application - Completions

Learn how to get your application completions using our API.


In this section, we will guide you on how to use the api/applications/:applicationId/completion endpoint to get your application completions.

cURL Example

Here is an example of how to use cURL to get your application completions:

Copy code
curl --request GET \
 --url https://generatedby.com/api/applications/APPLICATION_ID/completions \
 --header 'Content-Type: application/json' \
 --header 'Authorization: Bearer API_KEY' \

Replace APPLICATION_ID & API_KEY with your API key.

JavaScript Example

Here is an example of how to use fetch with JavaScript to get your application completions:

Copy code
const url = `https://generatedby.com/api/applications/${applicationId}/completions`
 
async function fetchData() {
  try {
    const response = await fetch(url, {
      headers: {
        Authorization: "Bearer API_KEY",
      },
      body: JSON.stringify(data),
    })
 
    if (!response.ok) {
      throw new Error(`HTTP error ${response.status}`)
    }
 
    const jsonData = await response.json()
    console.log(jsonData)
  } catch (error) {
    console.error("Error:", error)
  }
}
 
fetchData()

Replace APPLICATION_ID & API_KEY with your API key.

For more details on how to use the API, please refer to the API section of the documentation.