Loading...
Loading...
Use an OpenAI-compatible baseURL to connect developer tools and production apps.
Free signup, get an API Key
Copy the baseURL and project key
OpenAI SDK-compatible calls
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.thistoken.ai/v1',
apiKey: 'your-api-key',
})
async function main() {
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [
{ role: 'user', content: 'Hello, how are you?' }
],
})
console.log(response.choices[0].message.content)
}
main()Any language compatible with the OpenAI SDK works
Need help? Contact us through a console ticket or [email protected].